ragie_ruby_sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +291 -0
- data/Rakefile +10 -0
- data/docs/AccessTokenCredentials.md +18 -0
- data/docs/AsyncDocumentMetadataUpdate.md +18 -0
- data/docs/AudioModalityData.md +20 -0
- data/docs/AuthenticatorConfluenceConnection.md +22 -0
- data/docs/AuthenticatorDropboxConnection.md +24 -0
- data/docs/AuthenticatorGmailConnection.md +24 -0
- data/docs/AuthenticatorGoogleDriveConnection.md +24 -0
- data/docs/AuthenticatorHubspotConnection.md +26 -0
- data/docs/AuthenticatorJiraConnection.md +20 -0
- data/docs/AuthenticatorList.md +20 -0
- data/docs/AuthenticatorNotionConnection.md +26 -0
- data/docs/AuthenticatorOnedriveConnection.md +24 -0
- data/docs/AuthenticatorSalesforceConnection.md +24 -0
- data/docs/AuthenticatorSharepointConnection.md +24 -0
- data/docs/AuthenticatorSlackConnection.md +24 -0
- data/docs/AuthenticatorsApi.md +293 -0
- data/docs/BackblazeCredentials.md +24 -0
- data/docs/BaseGetAuthenticator.md +22 -0
- data/docs/BetaApi.md +363 -0
- data/docs/Body.md +22 -0
- data/docs/BodyCreateDocument.md +28 -0
- data/docs/BodyUpdateDocumentFile.md +20 -0
- data/docs/BucketData.md +22 -0
- data/docs/ConfluenceData.md +24 -0
- data/docs/Connection.md +44 -0
- data/docs/Connection1.md +106 -0
- data/docs/Connection2.md +91 -0
- data/docs/ConnectionBase.md +22 -0
- data/docs/ConnectionLimitExceededWebhook.md +22 -0
- data/docs/ConnectionLimitExceededWebhookPayload.md +24 -0
- data/docs/ConnectionLimitParams.md +18 -0
- data/docs/ConnectionList.md +20 -0
- data/docs/ConnectionStats.md +20 -0
- data/docs/ConnectionSyncFinishedWebhook.md +22 -0
- data/docs/ConnectionSyncFinishedWebhookPayload.md +24 -0
- data/docs/ConnectionSyncProgressWebhook.md +22 -0
- data/docs/ConnectionSyncProgressWebhookPayload.md +42 -0
- data/docs/ConnectionSyncStartedWebhook.md +22 -0
- data/docs/ConnectionSyncStartedWebhookPayload.md +32 -0
- data/docs/ConnectionsApi.md +790 -0
- data/docs/ConnectorSource.md +15 -0
- data/docs/ConnectorSourceTypeInfo.md +24 -0
- data/docs/CreateAuthenticatorConnection.md +28 -0
- data/docs/CreateDocumentFromUrlParams.md +28 -0
- data/docs/CreateDocumentRawParams.md +26 -0
- data/docs/CreateGoogleAuthenticator.md +28 -0
- data/docs/CreateInstructionParams.md +30 -0
- data/docs/CreatePartitionParams.md +42 -0
- data/docs/Data.md +15 -0
- data/docs/DefaultApi.md +77 -0
- data/docs/DeleteConnectionPayload.md +18 -0
- data/docs/Document.md +36 -0
- data/docs/DocumentChunk.md +26 -0
- data/docs/DocumentChunkDetail.md +28 -0
- data/docs/DocumentChunkDetailModalityData.md +79 -0
- data/docs/DocumentChunkList.md +20 -0
- data/docs/DocumentDelete.md +18 -0
- data/docs/DocumentDeleteWebhook.md +22 -0
- data/docs/DocumentDeleteWebhookPayload.md +30 -0
- data/docs/DocumentFileUpdate.md +18 -0
- data/docs/DocumentGet.md +38 -0
- data/docs/DocumentList.md +20 -0
- data/docs/DocumentMetadataUpdate.md +18 -0
- data/docs/DocumentRawUpdate.md +18 -0
- data/docs/DocumentSummary.md +20 -0
- data/docs/DocumentUpdateWebhook.md +22 -0
- data/docs/DocumentUpdateWebhookPayload.md +34 -0
- data/docs/DocumentUrlUpdate.md +18 -0
- data/docs/DocumentWithContent.md +38 -0
- data/docs/DocumentsApi.md +1221 -0
- data/docs/EnterpriseApi.md +363 -0
- data/docs/EntitiesApi.md +436 -0
- data/docs/Entity.md +30 -0
- data/docs/EntityExtractedWebhook.md +22 -0
- data/docs/EntityExtractedWebhookPayload.md +34 -0
- data/docs/EntityList.md +20 -0
- data/docs/ErrorMessage.md +18 -0
- data/docs/FolderData.md +20 -0
- data/docs/FreshdeskCredentials.md +20 -0
- data/docs/FreshdeskData.md +20 -0
- data/docs/GmailData.md +18 -0
- data/docs/GoogleFolderData.md +22 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HubspotData.md +30 -0
- data/docs/Instruction.md +36 -0
- data/docs/IntercomCredentials.md +22 -0
- data/docs/IntercomData.md +28 -0
- data/docs/Link.md +20 -0
- data/docs/ListConnectorSourceTypeInfo.md +18 -0
- data/docs/MediaModeParam.md +22 -0
- data/docs/MediaType.md +15 -0
- data/docs/MetadataValue.md +15 -0
- data/docs/MetadataValue1.md +53 -0
- data/docs/Mode.md +22 -0
- data/docs/Mode1.md +22 -0
- data/docs/Mode2.md +49 -0
- data/docs/Mode2OneOf.md +22 -0
- data/docs/OAuthCredentials.md +26 -0
- data/docs/OAuthRefreshTokenCredentials.md +18 -0
- data/docs/OAuthUrlCreate.md +34 -0
- data/docs/OAuthUrlResponse.md +18 -0
- data/docs/OnedriveData.md +22 -0
- data/docs/Pagination.md +20 -0
- data/docs/Partition.md +24 -0
- data/docs/PartitionDetail.md +26 -0
- data/docs/PartitionLimitExceededWebhook.md +22 -0
- data/docs/PartitionLimitExceededWebhookPayload.md +20 -0
- data/docs/PartitionLimitParams.md +40 -0
- data/docs/PartitionLimitResetWebhook.md +22 -0
- data/docs/PartitionLimitResetWebhookPayload.md +18 -0
- data/docs/PartitionLimits.md +40 -0
- data/docs/PartitionList.md +20 -0
- data/docs/PartitionStats.md +42 -0
- data/docs/PartitionStrategy.md +22 -0
- data/docs/PartitionsApi.md +363 -0
- data/docs/PatchDocumentMetadataParams.md +20 -0
- data/docs/Payload.md +84 -0
- data/docs/PublicBackblazeConnection.md +22 -0
- data/docs/PublicCreateConnection.md +28 -0
- data/docs/PublicFreshdeskConnection.md +24 -0
- data/docs/PublicGCSConnection.md +22 -0
- data/docs/PublicIntercomConnection.md +22 -0
- data/docs/PublicS3CompatibleConnection.md +22 -0
- data/docs/PublicZendeskConnection.md +22 -0
- data/docs/ResponseOK.md +18 -0
- data/docs/ResponsePatchdocumentmetadata.md +20 -0
- data/docs/Retrieval.md +18 -0
- data/docs/RetrievalsApi.md +75 -0
- data/docs/RetrieveParams.md +30 -0
- data/docs/S3CompatibleCredentials.md +24 -0
- data/docs/ScoredChunk.md +34 -0
- data/docs/SetConnectionEnabledPayload.md +20 -0
- data/docs/SharepointData.md +20 -0
- data/docs/SharepointFileData.md +22 -0
- data/docs/SharepointSiteData.md +20 -0
- data/docs/SlackData.md +20 -0
- data/docs/Source.md +15 -0
- data/docs/Status.md +15 -0
- data/docs/UpdateDocumentFromUrlParams.md +20 -0
- data/docs/UpdateDocumentRawParams.md +18 -0
- data/docs/UpdateInstructionParams.md +18 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/VideoModalityData.md +20 -0
- data/docs/WordTimestamp.md +24 -0
- data/docs/ZendeskCredentials.md +22 -0
- data/docs/ZendeskData.md +18 -0
- data/git_push.sh +57 -0
- data/lib/ragie_ruby_sdk/api/authenticators_api.rb +298 -0
- data/lib/ragie_ruby_sdk/api/beta_api.rb +366 -0
- data/lib/ragie_ruby_sdk/api/connections_api.rb +777 -0
- data/lib/ragie_ruby_sdk/api/default_api.rb +90 -0
- data/lib/ragie_ruby_sdk/api/documents_api.rb +1206 -0
- data/lib/ragie_ruby_sdk/api/enterprise_api.rb +366 -0
- data/lib/ragie_ruby_sdk/api/entities_api.rb +438 -0
- data/lib/ragie_ruby_sdk/api/partitions_api.rb +361 -0
- data/lib/ragie_ruby_sdk/api/retrievals_api.rb +88 -0
- data/lib/ragie_ruby_sdk/api_client.rb +393 -0
- data/lib/ragie_ruby_sdk/api_error.rb +58 -0
- data/lib/ragie_ruby_sdk/configuration.rb +308 -0
- data/lib/ragie_ruby_sdk/models/access_token_credentials.rb +237 -0
- data/lib/ragie_ruby_sdk/models/async_document_metadata_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/audio_modality_data.rb +267 -0
- data/lib/ragie_ruby_sdk/models/authenticator_confluence_connection.rb +315 -0
- data/lib/ragie_ruby_sdk/models/authenticator_dropbox_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_gmail_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_google_drive_connection.rb +342 -0
- data/lib/ragie_ruby_sdk/models/authenticator_hubspot_connection.rb +365 -0
- data/lib/ragie_ruby_sdk/models/authenticator_jira_connection.rb +287 -0
- data/lib/ragie_ruby_sdk/models/authenticator_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/authenticator_notion_connection.rb +366 -0
- data/lib/ragie_ruby_sdk/models/authenticator_onedrive_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_salesforce_connection.rb +341 -0
- data/lib/ragie_ruby_sdk/models/authenticator_sharepoint_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/authenticator_slack_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/backblaze_credentials.rb +315 -0
- data/lib/ragie_ruby_sdk/models/base_get_authenticator.rb +290 -0
- data/lib/ragie_ruby_sdk/models/body.rb +111 -0
- data/lib/ragie_ruby_sdk/models/body_create_document.rb +292 -0
- data/lib/ragie_ruby_sdk/models/body_update_document_file.rb +250 -0
- data/lib/ragie_ruby_sdk/models/bucket_data.rb +258 -0
- data/lib/ragie_ruby_sdk/models/confluence_data.rb +315 -0
- data/lib/ragie_ruby_sdk/models/connection.rb +521 -0
- data/lib/ragie_ruby_sdk/models/connection1.rb +73 -0
- data/lib/ragie_ruby_sdk/models/connection2.rb +63 -0
- data/lib/ragie_ruby_sdk/models/connection_base.rb +274 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_exceeded_webhook_payload.rb +327 -0
- data/lib/ragie_ruby_sdk/models/connection_limit_params.rb +236 -0
- data/lib/ragie_ruby_sdk/models/connection_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/connection_stats.rb +263 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_finished_webhook_payload.rb +317 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_progress_webhook_payload.rb +551 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/connection_sync_started_webhook_payload.rb +421 -0
- data/lib/ragie_ruby_sdk/models/connector_source.rb +55 -0
- data/lib/ragie_ruby_sdk/models/connector_source_type_info.rb +337 -0
- data/lib/ragie_ruby_sdk/models/create_authenticator_connection.rb +307 -0
- data/lib/ragie_ruby_sdk/models/create_document_from_url_params.rb +306 -0
- data/lib/ragie_ruby_sdk/models/create_document_raw_params.rb +279 -0
- data/lib/ragie_ruby_sdk/models/create_google_authenticator.rb +360 -0
- data/lib/ragie_ruby_sdk/models/create_instruction_params.rb +373 -0
- data/lib/ragie_ruby_sdk/models/create_partition_params.rb +537 -0
- data/lib/ragie_ruby_sdk/models/data.rb +105 -0
- data/lib/ragie_ruby_sdk/models/delete_connection_payload.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document.rb +425 -0
- data/lib/ragie_ruby_sdk/models/document_chunk.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_detail.rb +323 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_detail_modality_data.rb +55 -0
- data/lib/ragie_ruby_sdk/models/document_chunk_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/document_delete.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_delete_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_delete_webhook_payload.rb +353 -0
- data/lib/ragie_ruby_sdk/models/document_file_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_get.rb +453 -0
- data/lib/ragie_ruby_sdk/models/document_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/document_metadata_update.rb +240 -0
- data/lib/ragie_ruby_sdk/models/document_raw_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_summary.rb +263 -0
- data/lib/ragie_ruby_sdk/models/document_update_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/document_update_webhook_payload.rb +391 -0
- data/lib/ragie_ruby_sdk/models/document_url_update.rb +237 -0
- data/lib/ragie_ruby_sdk/models/document_with_content.rb +451 -0
- data/lib/ragie_ruby_sdk/models/entity.rb +381 -0
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/entity_extracted_webhook_payload.rb +421 -0
- data/lib/ragie_ruby_sdk/models/entity_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/error_message.rb +237 -0
- data/lib/ragie_ruby_sdk/models/folder_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/freshdesk_credentials.rb +263 -0
- data/lib/ragie_ruby_sdk/models/freshdesk_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/gmail_data.rb +221 -0
- data/lib/ragie_ruby_sdk/models/google_folder_data.rb +289 -0
- data/lib/ragie_ruby_sdk/models/http_validation_error.rb +222 -0
- data/lib/ragie_ruby_sdk/models/hubspot_data.rb +393 -0
- data/lib/ragie_ruby_sdk/models/instruction.rb +451 -0
- data/lib/ragie_ruby_sdk/models/intercom_credentials.rb +290 -0
- data/lib/ragie_ruby_sdk/models/intercom_data.rb +367 -0
- data/lib/ragie_ruby_sdk/models/link.rb +263 -0
- data/lib/ragie_ruby_sdk/models/list_connector_source_type_info.rb +239 -0
- data/lib/ragie_ruby_sdk/models/media_mode_param.rb +287 -0
- data/lib/ragie_ruby_sdk/models/media_type.rb +104 -0
- data/lib/ragie_ruby_sdk/models/metadata_value.rb +106 -0
- data/lib/ragie_ruby_sdk/models/metadata_value1.rb +107 -0
- data/lib/ragie_ruby_sdk/models/mode.rb +105 -0
- data/lib/ragie_ruby_sdk/models/mode1.rb +104 -0
- data/lib/ragie_ruby_sdk/models/mode2.rb +106 -0
- data/lib/ragie_ruby_sdk/models/mode2_one_of.rb +287 -0
- data/lib/ragie_ruby_sdk/models/o_auth_credentials.rb +350 -0
- data/lib/ragie_ruby_sdk/models/o_auth_refresh_token_credentials.rb +237 -0
- data/lib/ragie_ruby_sdk/models/o_auth_url_create.rb +370 -0
- data/lib/ragie_ruby_sdk/models/o_auth_url_response.rb +237 -0
- data/lib/ragie_ruby_sdk/models/onedrive_data.rb +289 -0
- data/lib/ragie_ruby_sdk/models/pagination.rb +247 -0
- data/lib/ragie_ruby_sdk/models/partition.rb +299 -0
- data/lib/ragie_ruby_sdk/models/partition_detail.rb +325 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_exceeded_webhook_payload.rb +287 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_params.rb +511 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook.rb +313 -0
- data/lib/ragie_ruby_sdk/models/partition_limit_reset_webhook_payload.rb +237 -0
- data/lib/ragie_ruby_sdk/models/partition_limits.rb +511 -0
- data/lib/ragie_ruby_sdk/models/partition_list.rb +265 -0
- data/lib/ragie_ruby_sdk/models/partition_stats.rb +562 -0
- data/lib/ragie_ruby_sdk/models/partition_strategy.rb +104 -0
- data/lib/ragie_ruby_sdk/models/patch_document_metadata_params.rb +252 -0
- data/lib/ragie_ruby_sdk/models/payload.rb +60 -0
- data/lib/ragie_ruby_sdk/models/public_backblaze_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_create_connection.rb +307 -0
- data/lib/ragie_ruby_sdk/models/public_freshdesk_connection.rb +340 -0
- data/lib/ragie_ruby_sdk/models/public_gcs_connection.rb +315 -0
- data/lib/ragie_ruby_sdk/models/public_intercom_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_s3_compatible_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/public_zendesk_connection.rb +313 -0
- data/lib/ragie_ruby_sdk/models/response_ok.rb +222 -0
- data/lib/ragie_ruby_sdk/models/response_patchdocumentmetadata.rb +104 -0
- data/lib/ragie_ruby_sdk/models/retrieval.rb +239 -0
- data/lib/ragie_ruby_sdk/models/retrieve_params.rb +305 -0
- data/lib/ragie_ruby_sdk/models/s3_compatible_credentials.rb +299 -0
- data/lib/ragie_ruby_sdk/models/scored_chunk.rb +434 -0
- data/lib/ragie_ruby_sdk/models/set_connection_enabled_payload.rb +281 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_data.rb +265 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_file_data.rb +313 -0
- data/lib/ragie_ruby_sdk/models/sharepoint_site_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/slack_data.rb +263 -0
- data/lib/ragie_ruby_sdk/models/source.rb +105 -0
- data/lib/ragie_ruby_sdk/models/status.rb +103 -0
- data/lib/ragie_ruby_sdk/models/update_document_from_url_params.rb +247 -0
- data/lib/ragie_ruby_sdk/models/update_document_raw_params.rb +237 -0
- data/lib/ragie_ruby_sdk/models/update_instruction_params.rb +238 -0
- data/lib/ragie_ruby_sdk/models/validation_error.rb +291 -0
- data/lib/ragie_ruby_sdk/models/validation_error_loc_inner.rb +104 -0
- data/lib/ragie_ruby_sdk/models/video_modality_data.rb +267 -0
- data/lib/ragie_ruby_sdk/models/word_timestamp.rb +315 -0
- data/lib/ragie_ruby_sdk/models/zendesk_credentials.rb +289 -0
- data/lib/ragie_ruby_sdk/models/zendesk_data.rb +237 -0
- data/lib/ragie_ruby_sdk/version.rb +15 -0
- data/lib/ragie_ruby_sdk.rb +185 -0
- data/ragie_ruby_sdk.gemspec +39 -0
- data/spec/api/authenticators_api_spec.rb +85 -0
- data/spec/api/beta_api_spec.rb +97 -0
- data/spec/api/connections_api_spec.rb +173 -0
- data/spec/api/default_api_spec.rb +47 -0
- data/spec/api/documents_api_spec.rb +260 -0
- data/spec/api/enterprise_api_spec.rb +97 -0
- data/spec/api/entities_api_spec.rb +110 -0
- data/spec/api/partitions_api_spec.rb +97 -0
- data/spec/api/retrievals_api_spec.rb +46 -0
- data/spec/models/access_token_credentials_spec.rb +36 -0
- data/spec/models/async_document_metadata_update_spec.rb +36 -0
- data/spec/models/audio_modality_data_spec.rb +46 -0
- data/spec/models/authenticator_confluence_connection_spec.rb +52 -0
- data/spec/models/authenticator_dropbox_connection_spec.rb +58 -0
- data/spec/models/authenticator_gmail_connection_spec.rb +58 -0
- data/spec/models/authenticator_google_drive_connection_spec.rb +58 -0
- data/spec/models/authenticator_hubspot_connection_spec.rb +64 -0
- data/spec/models/authenticator_jira_connection_spec.rb +46 -0
- data/spec/models/authenticator_list_spec.rb +42 -0
- data/spec/models/authenticator_notion_connection_spec.rb +64 -0
- data/spec/models/authenticator_onedrive_connection_spec.rb +58 -0
- data/spec/models/authenticator_salesforce_connection_spec.rb +58 -0
- data/spec/models/authenticator_sharepoint_connection_spec.rb +58 -0
- data/spec/models/authenticator_slack_connection_spec.rb +58 -0
- data/spec/models/backblaze_credentials_spec.rb +54 -0
- data/spec/models/base_get_authenticator_spec.rb +48 -0
- data/spec/models/body_create_document_spec.rb +66 -0
- data/spec/models/body_spec.rb +21 -0
- data/spec/models/body_update_document_file_spec.rb +42 -0
- data/spec/models/bucket_data_spec.rb +48 -0
- data/spec/models/confluence_data_spec.rb +54 -0
- data/spec/models/connection1_spec.rb +44 -0
- data/spec/models/connection2_spec.rb +44 -0
- data/spec/models/connection_base_spec.rb +48 -0
- data/spec/models/connection_limit_exceeded_webhook_payload_spec.rb +58 -0
- data/spec/models/connection_limit_exceeded_webhook_spec.rb +52 -0
- data/spec/models/connection_limit_params_spec.rb +36 -0
- data/spec/models/connection_list_spec.rb +42 -0
- data/spec/models/connection_spec.rb +118 -0
- data/spec/models/connection_stats_spec.rb +42 -0
- data/spec/models/connection_sync_finished_webhook_payload_spec.rb +54 -0
- data/spec/models/connection_sync_finished_webhook_spec.rb +52 -0
- data/spec/models/connection_sync_progress_webhook_payload_spec.rb +108 -0
- data/spec/models/connection_sync_progress_webhook_spec.rb +52 -0
- data/spec/models/connection_sync_started_webhook_payload_spec.rb +78 -0
- data/spec/models/connection_sync_started_webhook_spec.rb +52 -0
- data/spec/models/connector_source_spec.rb +30 -0
- data/spec/models/connector_source_type_info_spec.rb +54 -0
- data/spec/models/create_authenticator_connection_spec.rb +66 -0
- data/spec/models/create_document_from_url_params_spec.rb +66 -0
- data/spec/models/create_document_raw_params_spec.rb +60 -0
- data/spec/models/create_google_authenticator_spec.rb +70 -0
- data/spec/models/create_instruction_params_spec.rb +76 -0
- data/spec/models/create_partition_params_spec.rb +108 -0
- data/spec/models/data_spec.rb +21 -0
- data/spec/models/delete_connection_payload_spec.rb +36 -0
- data/spec/models/document_chunk_detail_modality_data_spec.rb +44 -0
- data/spec/models/document_chunk_detail_spec.rb +66 -0
- data/spec/models/document_chunk_list_spec.rb +42 -0
- data/spec/models/document_chunk_spec.rb +60 -0
- data/spec/models/document_delete_spec.rb +36 -0
- data/spec/models/document_delete_webhook_payload_spec.rb +72 -0
- data/spec/models/document_delete_webhook_spec.rb +52 -0
- data/spec/models/document_file_update_spec.rb +36 -0
- data/spec/models/document_get_spec.rb +96 -0
- data/spec/models/document_list_spec.rb +42 -0
- data/spec/models/document_metadata_update_spec.rb +36 -0
- data/spec/models/document_raw_update_spec.rb +36 -0
- data/spec/models/document_spec.rb +90 -0
- data/spec/models/document_summary_spec.rb +42 -0
- data/spec/models/document_update_webhook_payload_spec.rb +84 -0
- data/spec/models/document_update_webhook_spec.rb +52 -0
- data/spec/models/document_url_update_spec.rb +36 -0
- data/spec/models/document_with_content_spec.rb +96 -0
- data/spec/models/entity_extracted_webhook_payload_spec.rb +84 -0
- data/spec/models/entity_extracted_webhook_spec.rb +52 -0
- data/spec/models/entity_list_spec.rb +42 -0
- data/spec/models/entity_spec.rb +72 -0
- data/spec/models/error_message_spec.rb +36 -0
- data/spec/models/folder_data_spec.rb +42 -0
- data/spec/models/freshdesk_credentials_spec.rb +42 -0
- data/spec/models/freshdesk_data_spec.rb +42 -0
- data/spec/models/gmail_data_spec.rb +36 -0
- data/spec/models/google_folder_data_spec.rb +48 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/hubspot_data_spec.rb +72 -0
- data/spec/models/instruction_spec.rb +94 -0
- data/spec/models/intercom_credentials_spec.rb +48 -0
- data/spec/models/intercom_data_spec.rb +66 -0
- data/spec/models/link_spec.rb +42 -0
- data/spec/models/list_connector_source_type_info_spec.rb +36 -0
- data/spec/models/media_mode_param_spec.rb +56 -0
- data/spec/models/media_type_spec.rb +21 -0
- data/spec/models/metadata_value1_spec.rb +32 -0
- data/spec/models/metadata_value_spec.rb +21 -0
- data/spec/models/mode1_spec.rb +21 -0
- data/spec/models/mode2_one_of_spec.rb +56 -0
- data/spec/models/mode2_spec.rb +32 -0
- data/spec/models/mode_spec.rb +21 -0
- data/spec/models/o_auth_credentials_spec.rb +64 -0
- data/spec/models/o_auth_refresh_token_credentials_spec.rb +36 -0
- data/spec/models/o_auth_url_create_spec.rb +88 -0
- data/spec/models/o_auth_url_response_spec.rb +36 -0
- data/spec/models/onedrive_data_spec.rb +48 -0
- data/spec/models/pagination_spec.rb +42 -0
- data/spec/models/partition_detail_spec.rb +60 -0
- data/spec/models/partition_limit_exceeded_webhook_payload_spec.rb +46 -0
- data/spec/models/partition_limit_exceeded_webhook_spec.rb +52 -0
- data/spec/models/partition_limit_params_spec.rb +102 -0
- data/spec/models/partition_limit_reset_webhook_payload_spec.rb +36 -0
- data/spec/models/partition_limit_reset_webhook_spec.rb +52 -0
- data/spec/models/partition_limits_spec.rb +102 -0
- data/spec/models/partition_list_spec.rb +42 -0
- data/spec/models/partition_spec.rb +54 -0
- data/spec/models/partition_stats_spec.rb +108 -0
- data/spec/models/partition_strategy_spec.rb +21 -0
- data/spec/models/patch_document_metadata_params_spec.rb +42 -0
- data/spec/models/payload_spec.rb +44 -0
- data/spec/models/public_backblaze_connection_spec.rb +52 -0
- data/spec/models/public_create_connection_spec.rb +66 -0
- data/spec/models/public_freshdesk_connection_spec.rb +58 -0
- data/spec/models/public_gcs_connection_spec.rb +52 -0
- data/spec/models/public_intercom_connection_spec.rb +52 -0
- data/spec/models/public_s3_compatible_connection_spec.rb +52 -0
- data/spec/models/public_zendesk_connection_spec.rb +52 -0
- data/spec/models/response_ok_spec.rb +36 -0
- data/spec/models/response_patchdocumentmetadata_spec.rb +21 -0
- data/spec/models/retrieval_spec.rb +36 -0
- data/spec/models/retrieve_params_spec.rb +72 -0
- data/spec/models/s3_compatible_credentials_spec.rb +54 -0
- data/spec/models/scored_chunk_spec.rb +84 -0
- data/spec/models/set_connection_enabled_payload_spec.rb +46 -0
- data/spec/models/sharepoint_data_spec.rb +42 -0
- data/spec/models/sharepoint_file_data_spec.rb +52 -0
- data/spec/models/sharepoint_site_data_spec.rb +42 -0
- data/spec/models/slack_data_spec.rb +42 -0
- data/spec/models/source_spec.rb +21 -0
- data/spec/models/status_spec.rb +21 -0
- data/spec/models/update_document_from_url_params_spec.rb +42 -0
- data/spec/models/update_document_raw_params_spec.rb +36 -0
- data/spec/models/update_instruction_params_spec.rb +36 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/video_modality_data_spec.rb +46 -0
- data/spec/models/word_timestamp_spec.rb +54 -0
- data/spec/models/zendesk_credentials_spec.rb +48 -0
- data/spec/models/zendesk_data_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- metadata +680 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
# RagieRubySdk::DocumentsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.ragie.ai*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_document**](DocumentsApi.md#create_document) | **POST** /documents | Create Document |
|
|
8
|
+
| [**create_document_from_url**](DocumentsApi.md#create_document_from_url) | **POST** /documents/url | Create Document From Url |
|
|
9
|
+
| [**create_document_raw**](DocumentsApi.md#create_document_raw) | **POST** /documents/raw | Create Document Raw |
|
|
10
|
+
| [**delete_document**](DocumentsApi.md#delete_document) | **DELETE** /documents/{document_id} | Delete Document |
|
|
11
|
+
| [**get_document**](DocumentsApi.md#get_document) | **GET** /documents/{document_id} | Get Document |
|
|
12
|
+
| [**get_document_chunk**](DocumentsApi.md#get_document_chunk) | **GET** /documents/{document_id}/chunks/{chunk_id} | Get Document Chunk |
|
|
13
|
+
| [**get_document_chunk_content**](DocumentsApi.md#get_document_chunk_content) | **GET** /documents/{document_id}/chunks/{chunk_id}/content | Get Document Chunk Content |
|
|
14
|
+
| [**get_document_chunks**](DocumentsApi.md#get_document_chunks) | **GET** /documents/{document_id}/chunks | Get Document Chunks |
|
|
15
|
+
| [**get_document_content**](DocumentsApi.md#get_document_content) | **GET** /documents/{document_id}/content | Get Document Content |
|
|
16
|
+
| [**get_document_source**](DocumentsApi.md#get_document_source) | **GET** /documents/{document_id}/source | Get Document Source |
|
|
17
|
+
| [**get_document_summary**](DocumentsApi.md#get_document_summary) | **GET** /documents/{document_id}/summary | Get Document Summary |
|
|
18
|
+
| [**list_documents**](DocumentsApi.md#list_documents) | **GET** /documents | List Documents |
|
|
19
|
+
| [**patch_document_metadata**](DocumentsApi.md#patch_document_metadata) | **PATCH** /documents/{document_id}/metadata | Patch Document Metadata |
|
|
20
|
+
| [**update_document_file**](DocumentsApi.md#update_document_file) | **PUT** /documents/{document_id}/file | Update Document File |
|
|
21
|
+
| [**update_document_from_url**](DocumentsApi.md#update_document_from_url) | **PUT** /documents/{document_id}/url | Update Document Url |
|
|
22
|
+
| [**update_document_raw**](DocumentsApi.md#update_document_raw) | **PUT** /documents/{document_id}/raw | Update Document Raw |
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## create_document
|
|
26
|
+
|
|
27
|
+
> <Document> create_document(file, opts)
|
|
28
|
+
|
|
29
|
+
Create Document
|
|
30
|
+
|
|
31
|
+
On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`.
|
|
32
|
+
|
|
33
|
+
### Examples
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
require 'time'
|
|
37
|
+
require 'ragie_ruby_sdk'
|
|
38
|
+
# setup authorization
|
|
39
|
+
RagieRubySdk.configure do |config|
|
|
40
|
+
# Configure Bearer authorization: auth
|
|
41
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
45
|
+
file = File.new('/path/to/some/file') # File | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`.
|
|
46
|
+
opts = {
|
|
47
|
+
mode: RagieRubySdk::Mode2OneOf.new, # Mode2 |
|
|
48
|
+
metadata: { key: nil}, # Hash<String, MetadataValue1> | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`.
|
|
49
|
+
external_id: 'external_id_example', # String | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found.
|
|
50
|
+
name: 'name_example', # String | An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name.
|
|
51
|
+
partition: 'partition_example' # String | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created.
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
begin
|
|
55
|
+
# Create Document
|
|
56
|
+
result = api_instance.create_document(file, opts)
|
|
57
|
+
p result
|
|
58
|
+
rescue RagieRubySdk::ApiError => e
|
|
59
|
+
puts "Error when calling DocumentsApi->create_document: #{e}"
|
|
60
|
+
end
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### Using the create_document_with_http_info variant
|
|
64
|
+
|
|
65
|
+
This returns an Array which contains the response data, status code and headers.
|
|
66
|
+
|
|
67
|
+
> <Array(<Document>, Integer, Hash)> create_document_with_http_info(file, opts)
|
|
68
|
+
|
|
69
|
+
```ruby
|
|
70
|
+
begin
|
|
71
|
+
# Create Document
|
|
72
|
+
data, status_code, headers = api_instance.create_document_with_http_info(file, opts)
|
|
73
|
+
p status_code # => 2xx
|
|
74
|
+
p headers # => { ... }
|
|
75
|
+
p data # => <Document>
|
|
76
|
+
rescue RagieRubySdk::ApiError => e
|
|
77
|
+
puts "Error when calling DocumentsApi->create_document_with_http_info: #{e}"
|
|
78
|
+
end
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Parameters
|
|
82
|
+
|
|
83
|
+
| Name | Type | Description | Notes |
|
|
84
|
+
| ---- | ---- | ----------- | ----- |
|
|
85
|
+
| **file** | **File** | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. | |
|
|
86
|
+
| **mode** | [**Mode2**](Mode2.md) | | [optional] |
|
|
87
|
+
| **metadata** | [**Hash<String, MetadataValue1>**](Hash.md) | Metadata for the document. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. 1000 total values are allowed. Each item in an array counts towards the total. The following keys are reserved for internal use: `document_id`, `document_type`, `document_source`, `document_name`, `document_uploaded_at`, `start_time`, `end_time`. | [optional] |
|
|
88
|
+
| **external_id** | **String** | An optional identifier for the document. A common value might be an id in an external system or the URL where the source file may be found. | [optional] |
|
|
89
|
+
| **name** | **String** | An optional name for the document. If set, the document will have this name. Otherwise it will default to the file's name. | [optional] |
|
|
90
|
+
| **partition** | **String** | An optional partition identifier. Documents can be scoped to a partition. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition is created any time a document is created. | [optional] |
|
|
91
|
+
|
|
92
|
+
### Return type
|
|
93
|
+
|
|
94
|
+
[**Document**](Document.md)
|
|
95
|
+
|
|
96
|
+
### Authorization
|
|
97
|
+
|
|
98
|
+
[auth](../README.md#auth)
|
|
99
|
+
|
|
100
|
+
### HTTP request headers
|
|
101
|
+
|
|
102
|
+
- **Content-Type**: multipart/form-data
|
|
103
|
+
- **Accept**: application/json
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## create_document_from_url
|
|
107
|
+
|
|
108
|
+
> <Document> create_document_from_url(create_document_from_url_params)
|
|
109
|
+
|
|
110
|
+
Create Document From Url
|
|
111
|
+
|
|
112
|
+
Ingest a document from a publicly accessible URL. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`.
|
|
113
|
+
|
|
114
|
+
### Examples
|
|
115
|
+
|
|
116
|
+
```ruby
|
|
117
|
+
require 'time'
|
|
118
|
+
require 'ragie_ruby_sdk'
|
|
119
|
+
# setup authorization
|
|
120
|
+
RagieRubySdk.configure do |config|
|
|
121
|
+
# Configure Bearer authorization: auth
|
|
122
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
126
|
+
create_document_from_url_params = RagieRubySdk::CreateDocumentFromUrlParams.new({url: 'url_example'}) # CreateDocumentFromUrlParams |
|
|
127
|
+
|
|
128
|
+
begin
|
|
129
|
+
# Create Document From Url
|
|
130
|
+
result = api_instance.create_document_from_url(create_document_from_url_params)
|
|
131
|
+
p result
|
|
132
|
+
rescue RagieRubySdk::ApiError => e
|
|
133
|
+
puts "Error when calling DocumentsApi->create_document_from_url: #{e}"
|
|
134
|
+
end
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Using the create_document_from_url_with_http_info variant
|
|
138
|
+
|
|
139
|
+
This returns an Array which contains the response data, status code and headers.
|
|
140
|
+
|
|
141
|
+
> <Array(<Document>, Integer, Hash)> create_document_from_url_with_http_info(create_document_from_url_params)
|
|
142
|
+
|
|
143
|
+
```ruby
|
|
144
|
+
begin
|
|
145
|
+
# Create Document From Url
|
|
146
|
+
data, status_code, headers = api_instance.create_document_from_url_with_http_info(create_document_from_url_params)
|
|
147
|
+
p status_code # => 2xx
|
|
148
|
+
p headers # => { ... }
|
|
149
|
+
p data # => <Document>
|
|
150
|
+
rescue RagieRubySdk::ApiError => e
|
|
151
|
+
puts "Error when calling DocumentsApi->create_document_from_url_with_http_info: #{e}"
|
|
152
|
+
end
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Parameters
|
|
156
|
+
|
|
157
|
+
| Name | Type | Description | Notes |
|
|
158
|
+
| ---- | ---- | ----------- | ----- |
|
|
159
|
+
| **create_document_from_url_params** | [**CreateDocumentFromUrlParams**](CreateDocumentFromUrlParams.md) | | |
|
|
160
|
+
|
|
161
|
+
### Return type
|
|
162
|
+
|
|
163
|
+
[**Document**](Document.md)
|
|
164
|
+
|
|
165
|
+
### Authorization
|
|
166
|
+
|
|
167
|
+
[auth](../README.md#auth)
|
|
168
|
+
|
|
169
|
+
### HTTP request headers
|
|
170
|
+
|
|
171
|
+
- **Content-Type**: application/json
|
|
172
|
+
- **Accept**: application/json
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## create_document_raw
|
|
176
|
+
|
|
177
|
+
> <Document> create_document_raw(create_document_raw_params)
|
|
178
|
+
|
|
179
|
+
Create Document Raw
|
|
180
|
+
|
|
181
|
+
Ingest a document as raw text. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`.
|
|
182
|
+
|
|
183
|
+
### Examples
|
|
184
|
+
|
|
185
|
+
```ruby
|
|
186
|
+
require 'time'
|
|
187
|
+
require 'ragie_ruby_sdk'
|
|
188
|
+
# setup authorization
|
|
189
|
+
RagieRubySdk.configure do |config|
|
|
190
|
+
# Configure Bearer authorization: auth
|
|
191
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
195
|
+
create_document_raw_params = RagieRubySdk::CreateDocumentRawParams.new({data: RagieRubySdk::Data.new}) # CreateDocumentRawParams |
|
|
196
|
+
|
|
197
|
+
begin
|
|
198
|
+
# Create Document Raw
|
|
199
|
+
result = api_instance.create_document_raw(create_document_raw_params)
|
|
200
|
+
p result
|
|
201
|
+
rescue RagieRubySdk::ApiError => e
|
|
202
|
+
puts "Error when calling DocumentsApi->create_document_raw: #{e}"
|
|
203
|
+
end
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
#### Using the create_document_raw_with_http_info variant
|
|
207
|
+
|
|
208
|
+
This returns an Array which contains the response data, status code and headers.
|
|
209
|
+
|
|
210
|
+
> <Array(<Document>, Integer, Hash)> create_document_raw_with_http_info(create_document_raw_params)
|
|
211
|
+
|
|
212
|
+
```ruby
|
|
213
|
+
begin
|
|
214
|
+
# Create Document Raw
|
|
215
|
+
data, status_code, headers = api_instance.create_document_raw_with_http_info(create_document_raw_params)
|
|
216
|
+
p status_code # => 2xx
|
|
217
|
+
p headers # => { ... }
|
|
218
|
+
p data # => <Document>
|
|
219
|
+
rescue RagieRubySdk::ApiError => e
|
|
220
|
+
puts "Error when calling DocumentsApi->create_document_raw_with_http_info: #{e}"
|
|
221
|
+
end
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Parameters
|
|
225
|
+
|
|
226
|
+
| Name | Type | Description | Notes |
|
|
227
|
+
| ---- | ---- | ----------- | ----- |
|
|
228
|
+
| **create_document_raw_params** | [**CreateDocumentRawParams**](CreateDocumentRawParams.md) | | |
|
|
229
|
+
|
|
230
|
+
### Return type
|
|
231
|
+
|
|
232
|
+
[**Document**](Document.md)
|
|
233
|
+
|
|
234
|
+
### Authorization
|
|
235
|
+
|
|
236
|
+
[auth](../README.md#auth)
|
|
237
|
+
|
|
238
|
+
### HTTP request headers
|
|
239
|
+
|
|
240
|
+
- **Content-Type**: application/json
|
|
241
|
+
- **Accept**: application/json
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
## delete_document
|
|
245
|
+
|
|
246
|
+
> <DocumentDelete> delete_document(document_id, opts)
|
|
247
|
+
|
|
248
|
+
Delete Document
|
|
249
|
+
|
|
250
|
+
### Examples
|
|
251
|
+
|
|
252
|
+
```ruby
|
|
253
|
+
require 'time'
|
|
254
|
+
require 'ragie_ruby_sdk'
|
|
255
|
+
# setup authorization
|
|
256
|
+
RagieRubySdk.configure do |config|
|
|
257
|
+
# Configure Bearer authorization: auth
|
|
258
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
262
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
263
|
+
opts = {
|
|
264
|
+
async: true, # Boolean | If true, performs document deletion asynchronously
|
|
265
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
begin
|
|
269
|
+
# Delete Document
|
|
270
|
+
result = api_instance.delete_document(document_id, opts)
|
|
271
|
+
p result
|
|
272
|
+
rescue RagieRubySdk::ApiError => e
|
|
273
|
+
puts "Error when calling DocumentsApi->delete_document: #{e}"
|
|
274
|
+
end
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
#### Using the delete_document_with_http_info variant
|
|
278
|
+
|
|
279
|
+
This returns an Array which contains the response data, status code and headers.
|
|
280
|
+
|
|
281
|
+
> <Array(<DocumentDelete>, Integer, Hash)> delete_document_with_http_info(document_id, opts)
|
|
282
|
+
|
|
283
|
+
```ruby
|
|
284
|
+
begin
|
|
285
|
+
# Delete Document
|
|
286
|
+
data, status_code, headers = api_instance.delete_document_with_http_info(document_id, opts)
|
|
287
|
+
p status_code # => 2xx
|
|
288
|
+
p headers # => { ... }
|
|
289
|
+
p data # => <DocumentDelete>
|
|
290
|
+
rescue RagieRubySdk::ApiError => e
|
|
291
|
+
puts "Error when calling DocumentsApi->delete_document_with_http_info: #{e}"
|
|
292
|
+
end
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Parameters
|
|
296
|
+
|
|
297
|
+
| Name | Type | Description | Notes |
|
|
298
|
+
| ---- | ---- | ----------- | ----- |
|
|
299
|
+
| **document_id** | **String** | The id of the document. | |
|
|
300
|
+
| **async** | **Boolean** | If true, performs document deletion asynchronously | [optional] |
|
|
301
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
302
|
+
|
|
303
|
+
### Return type
|
|
304
|
+
|
|
305
|
+
[**DocumentDelete**](DocumentDelete.md)
|
|
306
|
+
|
|
307
|
+
### Authorization
|
|
308
|
+
|
|
309
|
+
[auth](../README.md#auth)
|
|
310
|
+
|
|
311
|
+
### HTTP request headers
|
|
312
|
+
|
|
313
|
+
- **Content-Type**: Not defined
|
|
314
|
+
- **Accept**: application/json
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
## get_document
|
|
318
|
+
|
|
319
|
+
> <DocumentGet> get_document(document_id, opts)
|
|
320
|
+
|
|
321
|
+
Get Document
|
|
322
|
+
|
|
323
|
+
### Examples
|
|
324
|
+
|
|
325
|
+
```ruby
|
|
326
|
+
require 'time'
|
|
327
|
+
require 'ragie_ruby_sdk'
|
|
328
|
+
# setup authorization
|
|
329
|
+
RagieRubySdk.configure do |config|
|
|
330
|
+
# Configure Bearer authorization: auth
|
|
331
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
335
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
336
|
+
opts = {
|
|
337
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
begin
|
|
341
|
+
# Get Document
|
|
342
|
+
result = api_instance.get_document(document_id, opts)
|
|
343
|
+
p result
|
|
344
|
+
rescue RagieRubySdk::ApiError => e
|
|
345
|
+
puts "Error when calling DocumentsApi->get_document: #{e}"
|
|
346
|
+
end
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
#### Using the get_document_with_http_info variant
|
|
350
|
+
|
|
351
|
+
This returns an Array which contains the response data, status code and headers.
|
|
352
|
+
|
|
353
|
+
> <Array(<DocumentGet>, Integer, Hash)> get_document_with_http_info(document_id, opts)
|
|
354
|
+
|
|
355
|
+
```ruby
|
|
356
|
+
begin
|
|
357
|
+
# Get Document
|
|
358
|
+
data, status_code, headers = api_instance.get_document_with_http_info(document_id, opts)
|
|
359
|
+
p status_code # => 2xx
|
|
360
|
+
p headers # => { ... }
|
|
361
|
+
p data # => <DocumentGet>
|
|
362
|
+
rescue RagieRubySdk::ApiError => e
|
|
363
|
+
puts "Error when calling DocumentsApi->get_document_with_http_info: #{e}"
|
|
364
|
+
end
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Parameters
|
|
368
|
+
|
|
369
|
+
| Name | Type | Description | Notes |
|
|
370
|
+
| ---- | ---- | ----------- | ----- |
|
|
371
|
+
| **document_id** | **String** | The id of the document. | |
|
|
372
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
373
|
+
|
|
374
|
+
### Return type
|
|
375
|
+
|
|
376
|
+
[**DocumentGet**](DocumentGet.md)
|
|
377
|
+
|
|
378
|
+
### Authorization
|
|
379
|
+
|
|
380
|
+
[auth](../README.md#auth)
|
|
381
|
+
|
|
382
|
+
### HTTP request headers
|
|
383
|
+
|
|
384
|
+
- **Content-Type**: Not defined
|
|
385
|
+
- **Accept**: application/json
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
## get_document_chunk
|
|
389
|
+
|
|
390
|
+
> <DocumentChunkDetail> get_document_chunk(document_id, chunk_id, opts)
|
|
391
|
+
|
|
392
|
+
Get Document Chunk
|
|
393
|
+
|
|
394
|
+
Gets a document chunk by its document and chunk ID.
|
|
395
|
+
|
|
396
|
+
### Examples
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
require 'time'
|
|
400
|
+
require 'ragie_ruby_sdk'
|
|
401
|
+
# setup authorization
|
|
402
|
+
RagieRubySdk.configure do |config|
|
|
403
|
+
# Configure Bearer authorization: auth
|
|
404
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
408
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
409
|
+
chunk_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The ID of the chunk.
|
|
410
|
+
opts = {
|
|
411
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
begin
|
|
415
|
+
# Get Document Chunk
|
|
416
|
+
result = api_instance.get_document_chunk(document_id, chunk_id, opts)
|
|
417
|
+
p result
|
|
418
|
+
rescue RagieRubySdk::ApiError => e
|
|
419
|
+
puts "Error when calling DocumentsApi->get_document_chunk: #{e}"
|
|
420
|
+
end
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
#### Using the get_document_chunk_with_http_info variant
|
|
424
|
+
|
|
425
|
+
This returns an Array which contains the response data, status code and headers.
|
|
426
|
+
|
|
427
|
+
> <Array(<DocumentChunkDetail>, Integer, Hash)> get_document_chunk_with_http_info(document_id, chunk_id, opts)
|
|
428
|
+
|
|
429
|
+
```ruby
|
|
430
|
+
begin
|
|
431
|
+
# Get Document Chunk
|
|
432
|
+
data, status_code, headers = api_instance.get_document_chunk_with_http_info(document_id, chunk_id, opts)
|
|
433
|
+
p status_code # => 2xx
|
|
434
|
+
p headers # => { ... }
|
|
435
|
+
p data # => <DocumentChunkDetail>
|
|
436
|
+
rescue RagieRubySdk::ApiError => e
|
|
437
|
+
puts "Error when calling DocumentsApi->get_document_chunk_with_http_info: #{e}"
|
|
438
|
+
end
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Parameters
|
|
442
|
+
|
|
443
|
+
| Name | Type | Description | Notes |
|
|
444
|
+
| ---- | ---- | ----------- | ----- |
|
|
445
|
+
| **document_id** | **String** | The id of the document. | |
|
|
446
|
+
| **chunk_id** | **String** | The ID of the chunk. | |
|
|
447
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
448
|
+
|
|
449
|
+
### Return type
|
|
450
|
+
|
|
451
|
+
[**DocumentChunkDetail**](DocumentChunkDetail.md)
|
|
452
|
+
|
|
453
|
+
### Authorization
|
|
454
|
+
|
|
455
|
+
[auth](../README.md#auth)
|
|
456
|
+
|
|
457
|
+
### HTTP request headers
|
|
458
|
+
|
|
459
|
+
- **Content-Type**: Not defined
|
|
460
|
+
- **Accept**: application/json
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
## get_document_chunk_content
|
|
464
|
+
|
|
465
|
+
> Object get_document_chunk_content(document_id, chunk_id, opts)
|
|
466
|
+
|
|
467
|
+
Get Document Chunk Content
|
|
468
|
+
|
|
469
|
+
Returns the content of a document chunk in the requested format. Can be used to stream media of the content for audio/video documents.
|
|
470
|
+
|
|
471
|
+
### Examples
|
|
472
|
+
|
|
473
|
+
```ruby
|
|
474
|
+
require 'time'
|
|
475
|
+
require 'ragie_ruby_sdk'
|
|
476
|
+
# setup authorization
|
|
477
|
+
RagieRubySdk.configure do |config|
|
|
478
|
+
# Configure Bearer authorization: auth
|
|
479
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
483
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
484
|
+
chunk_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The ID of the chunk.
|
|
485
|
+
opts = {
|
|
486
|
+
media_type: 'text/plain', # String | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type.
|
|
487
|
+
download: true, # Boolean | Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download.
|
|
488
|
+
partition: 'partition_example', # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
489
|
+
range: 'range_example' # String |
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
begin
|
|
493
|
+
# Get Document Chunk Content
|
|
494
|
+
result = api_instance.get_document_chunk_content(document_id, chunk_id, opts)
|
|
495
|
+
p result
|
|
496
|
+
rescue RagieRubySdk::ApiError => e
|
|
497
|
+
puts "Error when calling DocumentsApi->get_document_chunk_content: #{e}"
|
|
498
|
+
end
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
#### Using the get_document_chunk_content_with_http_info variant
|
|
502
|
+
|
|
503
|
+
This returns an Array which contains the response data, status code and headers.
|
|
504
|
+
|
|
505
|
+
> <Array(Object, Integer, Hash)> get_document_chunk_content_with_http_info(document_id, chunk_id, opts)
|
|
506
|
+
|
|
507
|
+
```ruby
|
|
508
|
+
begin
|
|
509
|
+
# Get Document Chunk Content
|
|
510
|
+
data, status_code, headers = api_instance.get_document_chunk_content_with_http_info(document_id, chunk_id, opts)
|
|
511
|
+
p status_code # => 2xx
|
|
512
|
+
p headers # => { ... }
|
|
513
|
+
p data # => Object
|
|
514
|
+
rescue RagieRubySdk::ApiError => e
|
|
515
|
+
puts "Error when calling DocumentsApi->get_document_chunk_content_with_http_info: #{e}"
|
|
516
|
+
end
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### Parameters
|
|
520
|
+
|
|
521
|
+
| Name | Type | Description | Notes |
|
|
522
|
+
| ---- | ---- | ----------- | ----- |
|
|
523
|
+
| **document_id** | **String** | The id of the document. | |
|
|
524
|
+
| **chunk_id** | **String** | The ID of the chunk. | |
|
|
525
|
+
| **media_type** | **String** | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the chunk's document type. | [optional] |
|
|
526
|
+
| **download** | **Boolean** | Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download. | [optional][default to false] |
|
|
527
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
528
|
+
| **range** | **String** | | [optional] |
|
|
529
|
+
|
|
530
|
+
### Return type
|
|
531
|
+
|
|
532
|
+
**Object**
|
|
533
|
+
|
|
534
|
+
### Authorization
|
|
535
|
+
|
|
536
|
+
[auth](../README.md#auth)
|
|
537
|
+
|
|
538
|
+
### HTTP request headers
|
|
539
|
+
|
|
540
|
+
- **Content-Type**: Not defined
|
|
541
|
+
- **Accept**: application/json, application/octet-stream, audio/mpeg, text/plain
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
## get_document_chunks
|
|
545
|
+
|
|
546
|
+
> <DocumentChunkList> get_document_chunks(document_id, opts)
|
|
547
|
+
|
|
548
|
+
Get Document Chunks
|
|
549
|
+
|
|
550
|
+
List all document chunks sorted by index in ascending order. May be limited to a range of chunk indices with the `start_index` and `end_index` parameters. Documents created prior to 9/18/2024, which have not been updated since, have chunks which do not include an index and their index will be returned as -1. They will be sorted by their ID instead. Updating the document using the `Update Document File` or `Update Document Raw` endpoint will regenerate document chunks, including their index. Results are paginated with a max limit of 100. When more chunks are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.
|
|
551
|
+
|
|
552
|
+
### Examples
|
|
553
|
+
|
|
554
|
+
```ruby
|
|
555
|
+
require 'time'
|
|
556
|
+
require 'ragie_ruby_sdk'
|
|
557
|
+
# setup authorization
|
|
558
|
+
RagieRubySdk.configure do |config|
|
|
559
|
+
# Configure Bearer authorization: auth
|
|
560
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
564
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
565
|
+
opts = {
|
|
566
|
+
start_index: 56, # Integer | The inclusive starting index of the chunk range to list. If omitted and `end_index` is present effectively limits results to at most one chunk matching `end_index`. If both `start_index` and `end_index` are omitted, results are not limited by index.
|
|
567
|
+
end_index: 56, # Integer | The inclusive ending index of the chunk range to list. If omitted and `start_index` is present effectively limits results to at most one chunk matching `start_index`. If both `start_index` and `end_index` are omitted, results are not limited by index.
|
|
568
|
+
cursor: 'cursor_example', # String | An opaque cursor for pagination
|
|
569
|
+
page_size: 56, # Integer | The number of items per page (must be greater than 0 and less than or equal to 100)
|
|
570
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
begin
|
|
574
|
+
# Get Document Chunks
|
|
575
|
+
result = api_instance.get_document_chunks(document_id, opts)
|
|
576
|
+
p result
|
|
577
|
+
rescue RagieRubySdk::ApiError => e
|
|
578
|
+
puts "Error when calling DocumentsApi->get_document_chunks: #{e}"
|
|
579
|
+
end
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
#### Using the get_document_chunks_with_http_info variant
|
|
583
|
+
|
|
584
|
+
This returns an Array which contains the response data, status code and headers.
|
|
585
|
+
|
|
586
|
+
> <Array(<DocumentChunkList>, Integer, Hash)> get_document_chunks_with_http_info(document_id, opts)
|
|
587
|
+
|
|
588
|
+
```ruby
|
|
589
|
+
begin
|
|
590
|
+
# Get Document Chunks
|
|
591
|
+
data, status_code, headers = api_instance.get_document_chunks_with_http_info(document_id, opts)
|
|
592
|
+
p status_code # => 2xx
|
|
593
|
+
p headers # => { ... }
|
|
594
|
+
p data # => <DocumentChunkList>
|
|
595
|
+
rescue RagieRubySdk::ApiError => e
|
|
596
|
+
puts "Error when calling DocumentsApi->get_document_chunks_with_http_info: #{e}"
|
|
597
|
+
end
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
### Parameters
|
|
601
|
+
|
|
602
|
+
| Name | Type | Description | Notes |
|
|
603
|
+
| ---- | ---- | ----------- | ----- |
|
|
604
|
+
| **document_id** | **String** | The id of the document. | |
|
|
605
|
+
| **start_index** | **Integer** | The inclusive starting index of the chunk range to list. If omitted and `end_index` is present effectively limits results to at most one chunk matching `end_index`. If both `start_index` and `end_index` are omitted, results are not limited by index. | [optional] |
|
|
606
|
+
| **end_index** | **Integer** | The inclusive ending index of the chunk range to list. If omitted and `start_index` is present effectively limits results to at most one chunk matching `start_index`. If both `start_index` and `end_index` are omitted, results are not limited by index. | [optional] |
|
|
607
|
+
| **cursor** | **String** | An opaque cursor for pagination | [optional] |
|
|
608
|
+
| **page_size** | **Integer** | The number of items per page (must be greater than 0 and less than or equal to 100) | [optional][default to 10] |
|
|
609
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
610
|
+
|
|
611
|
+
### Return type
|
|
612
|
+
|
|
613
|
+
[**DocumentChunkList**](DocumentChunkList.md)
|
|
614
|
+
|
|
615
|
+
### Authorization
|
|
616
|
+
|
|
617
|
+
[auth](../README.md#auth)
|
|
618
|
+
|
|
619
|
+
### HTTP request headers
|
|
620
|
+
|
|
621
|
+
- **Content-Type**: Not defined
|
|
622
|
+
- **Accept**: application/json
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
## get_document_content
|
|
626
|
+
|
|
627
|
+
> <DocumentWithContent> get_document_content(document_id, opts)
|
|
628
|
+
|
|
629
|
+
Get Document Content
|
|
630
|
+
|
|
631
|
+
Get the content of a document. The `media_type` parameter can be used to request the content in a different format. When requesting as `application/json` additional metadata about the document will be included. If the original document contained content such as images or other non-textual media, this response will include a text description of that media instead of the original file data. Using mime types such as `audio/mpeg` or `video/mp4` will stream the file in a format that can be provided to an audio video player.
|
|
632
|
+
|
|
633
|
+
### Examples
|
|
634
|
+
|
|
635
|
+
```ruby
|
|
636
|
+
require 'time'
|
|
637
|
+
require 'ragie_ruby_sdk'
|
|
638
|
+
# setup authorization
|
|
639
|
+
RagieRubySdk.configure do |config|
|
|
640
|
+
# Configure Bearer authorization: auth
|
|
641
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
645
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
646
|
+
opts = {
|
|
647
|
+
media_type: RagieRubySdk::MediaType.new, # MediaType | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type.
|
|
648
|
+
download: true, # Boolean | Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download.
|
|
649
|
+
partition: 'partition_example', # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
650
|
+
range: 'range_example' # String |
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
begin
|
|
654
|
+
# Get Document Content
|
|
655
|
+
result = api_instance.get_document_content(document_id, opts)
|
|
656
|
+
p result
|
|
657
|
+
rescue RagieRubySdk::ApiError => e
|
|
658
|
+
puts "Error when calling DocumentsApi->get_document_content: #{e}"
|
|
659
|
+
end
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
#### Using the get_document_content_with_http_info variant
|
|
663
|
+
|
|
664
|
+
This returns an Array which contains the response data, status code and headers.
|
|
665
|
+
|
|
666
|
+
> <Array(<DocumentWithContent>, Integer, Hash)> get_document_content_with_http_info(document_id, opts)
|
|
667
|
+
|
|
668
|
+
```ruby
|
|
669
|
+
begin
|
|
670
|
+
# Get Document Content
|
|
671
|
+
data, status_code, headers = api_instance.get_document_content_with_http_info(document_id, opts)
|
|
672
|
+
p status_code # => 2xx
|
|
673
|
+
p headers # => { ... }
|
|
674
|
+
p data # => <DocumentWithContent>
|
|
675
|
+
rescue RagieRubySdk::ApiError => e
|
|
676
|
+
puts "Error when calling DocumentsApi->get_document_content_with_http_info: #{e}"
|
|
677
|
+
end
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### Parameters
|
|
681
|
+
|
|
682
|
+
| Name | Type | Description | Notes |
|
|
683
|
+
| ---- | ---- | ----------- | ----- |
|
|
684
|
+
| **document_id** | **String** | The id of the document. | |
|
|
685
|
+
| **media_type** | [**MediaType**](.md) | The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type. | [optional] |
|
|
686
|
+
| **download** | **Boolean** | Whether to return the content as a file download or a raw stream. If set to `true`, the content will be returned as a named file for download. | [optional][default to false] |
|
|
687
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
688
|
+
| **range** | **String** | | [optional] |
|
|
689
|
+
|
|
690
|
+
### Return type
|
|
691
|
+
|
|
692
|
+
[**DocumentWithContent**](DocumentWithContent.md)
|
|
693
|
+
|
|
694
|
+
### Authorization
|
|
695
|
+
|
|
696
|
+
[auth](../README.md#auth)
|
|
697
|
+
|
|
698
|
+
### HTTP request headers
|
|
699
|
+
|
|
700
|
+
- **Content-Type**: Not defined
|
|
701
|
+
- **Accept**: application/json
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
## get_document_source
|
|
705
|
+
|
|
706
|
+
> File get_document_source(document_id, opts)
|
|
707
|
+
|
|
708
|
+
Get Document Source
|
|
709
|
+
|
|
710
|
+
Get the source file of a document. The source file is the original file that was uploaded to create the document. If the document was created from a URL, the source file will be the content of the URL. If the document was created by a connection, the source file will vary based on the type of the connection. For example, a Google Drive connection will return the file that was synced from the Google Drive, while a SalesForce connection would return a JSON file of the data synced from SalesForce.
|
|
711
|
+
|
|
712
|
+
### Examples
|
|
713
|
+
|
|
714
|
+
```ruby
|
|
715
|
+
require 'time'
|
|
716
|
+
require 'ragie_ruby_sdk'
|
|
717
|
+
# setup authorization
|
|
718
|
+
RagieRubySdk.configure do |config|
|
|
719
|
+
# Configure Bearer authorization: auth
|
|
720
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
724
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
725
|
+
opts = {
|
|
726
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
begin
|
|
730
|
+
# Get Document Source
|
|
731
|
+
result = api_instance.get_document_source(document_id, opts)
|
|
732
|
+
p result
|
|
733
|
+
rescue RagieRubySdk::ApiError => e
|
|
734
|
+
puts "Error when calling DocumentsApi->get_document_source: #{e}"
|
|
735
|
+
end
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
#### Using the get_document_source_with_http_info variant
|
|
739
|
+
|
|
740
|
+
This returns an Array which contains the response data, status code and headers.
|
|
741
|
+
|
|
742
|
+
> <Array(File, Integer, Hash)> get_document_source_with_http_info(document_id, opts)
|
|
743
|
+
|
|
744
|
+
```ruby
|
|
745
|
+
begin
|
|
746
|
+
# Get Document Source
|
|
747
|
+
data, status_code, headers = api_instance.get_document_source_with_http_info(document_id, opts)
|
|
748
|
+
p status_code # => 2xx
|
|
749
|
+
p headers # => { ... }
|
|
750
|
+
p data # => File
|
|
751
|
+
rescue RagieRubySdk::ApiError => e
|
|
752
|
+
puts "Error when calling DocumentsApi->get_document_source_with_http_info: #{e}"
|
|
753
|
+
end
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
### Parameters
|
|
757
|
+
|
|
758
|
+
| Name | Type | Description | Notes |
|
|
759
|
+
| ---- | ---- | ----------- | ----- |
|
|
760
|
+
| **document_id** | **String** | The id of the document. | |
|
|
761
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
762
|
+
|
|
763
|
+
### Return type
|
|
764
|
+
|
|
765
|
+
**File**
|
|
766
|
+
|
|
767
|
+
### Authorization
|
|
768
|
+
|
|
769
|
+
[auth](../README.md#auth)
|
|
770
|
+
|
|
771
|
+
### HTTP request headers
|
|
772
|
+
|
|
773
|
+
- **Content-Type**: Not defined
|
|
774
|
+
- **Accept**: application/octet-stream, application/json
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
## get_document_summary
|
|
778
|
+
|
|
779
|
+
> <DocumentSummary> get_document_summary(document_id, opts)
|
|
780
|
+
|
|
781
|
+
Get Document Summary
|
|
782
|
+
|
|
783
|
+
Get a LLM generated summary of the document. The summary is created when the document is first created or updated. Documents of types ['xls', 'xlsx', 'csv', 'json'] are not supported for summarization. Documents greater than 1M in token length are not supported. This feature is in beta and may change in the future.
|
|
784
|
+
|
|
785
|
+
### Examples
|
|
786
|
+
|
|
787
|
+
```ruby
|
|
788
|
+
require 'time'
|
|
789
|
+
require 'ragie_ruby_sdk'
|
|
790
|
+
# setup authorization
|
|
791
|
+
RagieRubySdk.configure do |config|
|
|
792
|
+
# Configure Bearer authorization: auth
|
|
793
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
794
|
+
end
|
|
795
|
+
|
|
796
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
797
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
798
|
+
opts = {
|
|
799
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
begin
|
|
803
|
+
# Get Document Summary
|
|
804
|
+
result = api_instance.get_document_summary(document_id, opts)
|
|
805
|
+
p result
|
|
806
|
+
rescue RagieRubySdk::ApiError => e
|
|
807
|
+
puts "Error when calling DocumentsApi->get_document_summary: #{e}"
|
|
808
|
+
end
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
#### Using the get_document_summary_with_http_info variant
|
|
812
|
+
|
|
813
|
+
This returns an Array which contains the response data, status code and headers.
|
|
814
|
+
|
|
815
|
+
> <Array(<DocumentSummary>, Integer, Hash)> get_document_summary_with_http_info(document_id, opts)
|
|
816
|
+
|
|
817
|
+
```ruby
|
|
818
|
+
begin
|
|
819
|
+
# Get Document Summary
|
|
820
|
+
data, status_code, headers = api_instance.get_document_summary_with_http_info(document_id, opts)
|
|
821
|
+
p status_code # => 2xx
|
|
822
|
+
p headers # => { ... }
|
|
823
|
+
p data # => <DocumentSummary>
|
|
824
|
+
rescue RagieRubySdk::ApiError => e
|
|
825
|
+
puts "Error when calling DocumentsApi->get_document_summary_with_http_info: #{e}"
|
|
826
|
+
end
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
### Parameters
|
|
830
|
+
|
|
831
|
+
| Name | Type | Description | Notes |
|
|
832
|
+
| ---- | ---- | ----------- | ----- |
|
|
833
|
+
| **document_id** | **String** | The id of the document. | |
|
|
834
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
835
|
+
|
|
836
|
+
### Return type
|
|
837
|
+
|
|
838
|
+
[**DocumentSummary**](DocumentSummary.md)
|
|
839
|
+
|
|
840
|
+
### Authorization
|
|
841
|
+
|
|
842
|
+
[auth](../README.md#auth)
|
|
843
|
+
|
|
844
|
+
### HTTP request headers
|
|
845
|
+
|
|
846
|
+
- **Content-Type**: Not defined
|
|
847
|
+
- **Accept**: application/json
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
## list_documents
|
|
851
|
+
|
|
852
|
+
> <DocumentList> list_documents(opts)
|
|
853
|
+
|
|
854
|
+
List Documents
|
|
855
|
+
|
|
856
|
+
List all documents sorted by created_at in descending order. Results are paginated with a max limit of 100. When more documents are available, a `cursor` will be provided. Use the `cursor` parameter to retrieve the subsequent page.
|
|
857
|
+
|
|
858
|
+
### Examples
|
|
859
|
+
|
|
860
|
+
```ruby
|
|
861
|
+
require 'time'
|
|
862
|
+
require 'ragie_ruby_sdk'
|
|
863
|
+
# setup authorization
|
|
864
|
+
RagieRubySdk.configure do |config|
|
|
865
|
+
# Configure Bearer authorization: auth
|
|
866
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
867
|
+
end
|
|
868
|
+
|
|
869
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
870
|
+
opts = {
|
|
871
|
+
cursor: 'cursor_example', # String | An opaque cursor for pagination
|
|
872
|
+
page_size: 56, # Integer | The number of items per page (must be greater than 0 and less than or equal to 100)
|
|
873
|
+
filter: 'filter_example', # String | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples.
|
|
874
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
begin
|
|
878
|
+
# List Documents
|
|
879
|
+
result = api_instance.list_documents(opts)
|
|
880
|
+
p result
|
|
881
|
+
rescue RagieRubySdk::ApiError => e
|
|
882
|
+
puts "Error when calling DocumentsApi->list_documents: #{e}"
|
|
883
|
+
end
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
#### Using the list_documents_with_http_info variant
|
|
887
|
+
|
|
888
|
+
This returns an Array which contains the response data, status code and headers.
|
|
889
|
+
|
|
890
|
+
> <Array(<DocumentList>, Integer, Hash)> list_documents_with_http_info(opts)
|
|
891
|
+
|
|
892
|
+
```ruby
|
|
893
|
+
begin
|
|
894
|
+
# List Documents
|
|
895
|
+
data, status_code, headers = api_instance.list_documents_with_http_info(opts)
|
|
896
|
+
p status_code # => 2xx
|
|
897
|
+
p headers # => { ... }
|
|
898
|
+
p data # => <DocumentList>
|
|
899
|
+
rescue RagieRubySdk::ApiError => e
|
|
900
|
+
puts "Error when calling DocumentsApi->list_documents_with_http_info: #{e}"
|
|
901
|
+
end
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
### Parameters
|
|
905
|
+
|
|
906
|
+
| Name | Type | Description | Notes |
|
|
907
|
+
| ---- | ---- | ----------- | ----- |
|
|
908
|
+
| **cursor** | **String** | An opaque cursor for pagination | [optional] |
|
|
909
|
+
| **page_size** | **Integer** | The number of items per page (must be greater than 0 and less than or equal to 100) | [optional][default to 10] |
|
|
910
|
+
| **filter** | **String** | The metadata search filter. Returns only items which match the filter. The following filter operators are supported: $eq - Equal to (number, string, boolean), $ne - Not equal to (number, string, boolean), $gt - Greater than (number), $gte - Greater than or equal to (number), $lt - Less than (number), $lte - Less than or equal to (number), $in - In array (string or number), $nin - Not in array (string or number). The operators can be combined with AND and OR. Read [Metadata & Filters guide](https://docs.ragie.ai/docs/metadata-filters) for more details and examples. | [optional] |
|
|
911
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
912
|
+
|
|
913
|
+
### Return type
|
|
914
|
+
|
|
915
|
+
[**DocumentList**](DocumentList.md)
|
|
916
|
+
|
|
917
|
+
### Authorization
|
|
918
|
+
|
|
919
|
+
[auth](../README.md#auth)
|
|
920
|
+
|
|
921
|
+
### HTTP request headers
|
|
922
|
+
|
|
923
|
+
- **Content-Type**: Not defined
|
|
924
|
+
- **Accept**: application/json
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
## patch_document_metadata
|
|
928
|
+
|
|
929
|
+
> <ResponsePatchdocumentmetadata> patch_document_metadata(document_id, patch_document_metadata_params, opts)
|
|
930
|
+
|
|
931
|
+
Patch Document Metadata
|
|
932
|
+
|
|
933
|
+
### Examples
|
|
934
|
+
|
|
935
|
+
```ruby
|
|
936
|
+
require 'time'
|
|
937
|
+
require 'ragie_ruby_sdk'
|
|
938
|
+
# setup authorization
|
|
939
|
+
RagieRubySdk.configure do |config|
|
|
940
|
+
# Configure Bearer authorization: auth
|
|
941
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
942
|
+
end
|
|
943
|
+
|
|
944
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
945
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
946
|
+
patch_document_metadata_params = RagieRubySdk::PatchDocumentMetadataParams.new({metadata: { key: 3.56}}) # PatchDocumentMetadataParams |
|
|
947
|
+
opts = {
|
|
948
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
begin
|
|
952
|
+
# Patch Document Metadata
|
|
953
|
+
result = api_instance.patch_document_metadata(document_id, patch_document_metadata_params, opts)
|
|
954
|
+
p result
|
|
955
|
+
rescue RagieRubySdk::ApiError => e
|
|
956
|
+
puts "Error when calling DocumentsApi->patch_document_metadata: #{e}"
|
|
957
|
+
end
|
|
958
|
+
```
|
|
959
|
+
|
|
960
|
+
#### Using the patch_document_metadata_with_http_info variant
|
|
961
|
+
|
|
962
|
+
This returns an Array which contains the response data, status code and headers.
|
|
963
|
+
|
|
964
|
+
> <Array(<ResponsePatchdocumentmetadata>, Integer, Hash)> patch_document_metadata_with_http_info(document_id, patch_document_metadata_params, opts)
|
|
965
|
+
|
|
966
|
+
```ruby
|
|
967
|
+
begin
|
|
968
|
+
# Patch Document Metadata
|
|
969
|
+
data, status_code, headers = api_instance.patch_document_metadata_with_http_info(document_id, patch_document_metadata_params, opts)
|
|
970
|
+
p status_code # => 2xx
|
|
971
|
+
p headers # => { ... }
|
|
972
|
+
p data # => <ResponsePatchdocumentmetadata>
|
|
973
|
+
rescue RagieRubySdk::ApiError => e
|
|
974
|
+
puts "Error when calling DocumentsApi->patch_document_metadata_with_http_info: #{e}"
|
|
975
|
+
end
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
### Parameters
|
|
979
|
+
|
|
980
|
+
| Name | Type | Description | Notes |
|
|
981
|
+
| ---- | ---- | ----------- | ----- |
|
|
982
|
+
| **document_id** | **String** | The id of the document. | |
|
|
983
|
+
| **patch_document_metadata_params** | [**PatchDocumentMetadataParams**](PatchDocumentMetadataParams.md) | | |
|
|
984
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
985
|
+
|
|
986
|
+
### Return type
|
|
987
|
+
|
|
988
|
+
[**ResponsePatchdocumentmetadata**](ResponsePatchdocumentmetadata.md)
|
|
989
|
+
|
|
990
|
+
### Authorization
|
|
991
|
+
|
|
992
|
+
[auth](../README.md#auth)
|
|
993
|
+
|
|
994
|
+
### HTTP request headers
|
|
995
|
+
|
|
996
|
+
- **Content-Type**: application/json
|
|
997
|
+
- **Accept**: application/json
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
## update_document_file
|
|
1001
|
+
|
|
1002
|
+
> <DocumentFileUpdate> update_document_file(document_id, file, opts)
|
|
1003
|
+
|
|
1004
|
+
Update Document File
|
|
1005
|
+
|
|
1006
|
+
### Examples
|
|
1007
|
+
|
|
1008
|
+
```ruby
|
|
1009
|
+
require 'time'
|
|
1010
|
+
require 'ragie_ruby_sdk'
|
|
1011
|
+
# setup authorization
|
|
1012
|
+
RagieRubySdk.configure do |config|
|
|
1013
|
+
# Configure Bearer authorization: auth
|
|
1014
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1015
|
+
end
|
|
1016
|
+
|
|
1017
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
1018
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
1019
|
+
file = File.new('/path/to/some/file') # File | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`.
|
|
1020
|
+
opts = {
|
|
1021
|
+
partition: 'partition_example', # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
1022
|
+
mode: RagieRubySdk::Mode2OneOf.new # Mode2 |
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
begin
|
|
1026
|
+
# Update Document File
|
|
1027
|
+
result = api_instance.update_document_file(document_id, file, opts)
|
|
1028
|
+
p result
|
|
1029
|
+
rescue RagieRubySdk::ApiError => e
|
|
1030
|
+
puts "Error when calling DocumentsApi->update_document_file: #{e}"
|
|
1031
|
+
end
|
|
1032
|
+
```
|
|
1033
|
+
|
|
1034
|
+
#### Using the update_document_file_with_http_info variant
|
|
1035
|
+
|
|
1036
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1037
|
+
|
|
1038
|
+
> <Array(<DocumentFileUpdate>, Integer, Hash)> update_document_file_with_http_info(document_id, file, opts)
|
|
1039
|
+
|
|
1040
|
+
```ruby
|
|
1041
|
+
begin
|
|
1042
|
+
# Update Document File
|
|
1043
|
+
data, status_code, headers = api_instance.update_document_file_with_http_info(document_id, file, opts)
|
|
1044
|
+
p status_code # => 2xx
|
|
1045
|
+
p headers # => { ... }
|
|
1046
|
+
p data # => <DocumentFileUpdate>
|
|
1047
|
+
rescue RagieRubySdk::ApiError => e
|
|
1048
|
+
puts "Error when calling DocumentsApi->update_document_file_with_http_info: #{e}"
|
|
1049
|
+
end
|
|
1050
|
+
```
|
|
1051
|
+
|
|
1052
|
+
### Parameters
|
|
1053
|
+
|
|
1054
|
+
| Name | Type | Description | Notes |
|
|
1055
|
+
| ---- | ---- | ----------- | ----- |
|
|
1056
|
+
| **document_id** | **String** | The id of the document. | |
|
|
1057
|
+
| **file** | **File** | The binary file to upload, extract, and index for retrieval. The following file types are supported: Plain Text: `.eml` `.html` `.json` `.md` `.msg` `.rst` `.rtf` `.txt` `.xml` Images: `.png` `.webp` `.jpg` `.jpeg` `.tiff` `.bmp` `.heic` Documents: `.csv` `.doc` `.docx` `.epub` `.epub+zip` `.odt` `.pdf` `.ppt` `.pptx` `.tsv` `.xlsx` `.xls`. | |
|
|
1058
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
1059
|
+
| **mode** | [**Mode2**](Mode2.md) | | [optional] |
|
|
1060
|
+
|
|
1061
|
+
### Return type
|
|
1062
|
+
|
|
1063
|
+
[**DocumentFileUpdate**](DocumentFileUpdate.md)
|
|
1064
|
+
|
|
1065
|
+
### Authorization
|
|
1066
|
+
|
|
1067
|
+
[auth](../README.md#auth)
|
|
1068
|
+
|
|
1069
|
+
### HTTP request headers
|
|
1070
|
+
|
|
1071
|
+
- **Content-Type**: multipart/form-data
|
|
1072
|
+
- **Accept**: application/json
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
## update_document_from_url
|
|
1076
|
+
|
|
1077
|
+
> <DocumentUrlUpdate> update_document_from_url(document_id, update_document_from_url_params, opts)
|
|
1078
|
+
|
|
1079
|
+
Update Document Url
|
|
1080
|
+
|
|
1081
|
+
Updates a document from a publicly accessible URL. On ingest, the document goes through a series of steps before it is ready for retrieval. Each step is reflected in the status of the document which can be one of [`pending`, `partitioning`, `partitioned`, `refined`, `chunked`, `indexed`, `summary_indexed`, `keyword_indexed`, `ready`, `failed`]. The document is available for retrieval once it is in ready state. The summary index step can take a few seconds. You can optionally use the document for retrieval once it is in `indexed` state. However the summary will only be available once the state has changed to `summary_indexed` or `ready`.
|
|
1082
|
+
|
|
1083
|
+
### Examples
|
|
1084
|
+
|
|
1085
|
+
```ruby
|
|
1086
|
+
require 'time'
|
|
1087
|
+
require 'ragie_ruby_sdk'
|
|
1088
|
+
# setup authorization
|
|
1089
|
+
RagieRubySdk.configure do |config|
|
|
1090
|
+
# Configure Bearer authorization: auth
|
|
1091
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1092
|
+
end
|
|
1093
|
+
|
|
1094
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
1095
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
1096
|
+
update_document_from_url_params = RagieRubySdk::UpdateDocumentFromUrlParams.new({url: 'url_example'}) # UpdateDocumentFromUrlParams |
|
|
1097
|
+
opts = {
|
|
1098
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
begin
|
|
1102
|
+
# Update Document Url
|
|
1103
|
+
result = api_instance.update_document_from_url(document_id, update_document_from_url_params, opts)
|
|
1104
|
+
p result
|
|
1105
|
+
rescue RagieRubySdk::ApiError => e
|
|
1106
|
+
puts "Error when calling DocumentsApi->update_document_from_url: #{e}"
|
|
1107
|
+
end
|
|
1108
|
+
```
|
|
1109
|
+
|
|
1110
|
+
#### Using the update_document_from_url_with_http_info variant
|
|
1111
|
+
|
|
1112
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1113
|
+
|
|
1114
|
+
> <Array(<DocumentUrlUpdate>, Integer, Hash)> update_document_from_url_with_http_info(document_id, update_document_from_url_params, opts)
|
|
1115
|
+
|
|
1116
|
+
```ruby
|
|
1117
|
+
begin
|
|
1118
|
+
# Update Document Url
|
|
1119
|
+
data, status_code, headers = api_instance.update_document_from_url_with_http_info(document_id, update_document_from_url_params, opts)
|
|
1120
|
+
p status_code # => 2xx
|
|
1121
|
+
p headers # => { ... }
|
|
1122
|
+
p data # => <DocumentUrlUpdate>
|
|
1123
|
+
rescue RagieRubySdk::ApiError => e
|
|
1124
|
+
puts "Error when calling DocumentsApi->update_document_from_url_with_http_info: #{e}"
|
|
1125
|
+
end
|
|
1126
|
+
```
|
|
1127
|
+
|
|
1128
|
+
### Parameters
|
|
1129
|
+
|
|
1130
|
+
| Name | Type | Description | Notes |
|
|
1131
|
+
| ---- | ---- | ----------- | ----- |
|
|
1132
|
+
| **document_id** | **String** | The id of the document. | |
|
|
1133
|
+
| **update_document_from_url_params** | [**UpdateDocumentFromUrlParams**](UpdateDocumentFromUrlParams.md) | | |
|
|
1134
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
1135
|
+
|
|
1136
|
+
### Return type
|
|
1137
|
+
|
|
1138
|
+
[**DocumentUrlUpdate**](DocumentUrlUpdate.md)
|
|
1139
|
+
|
|
1140
|
+
### Authorization
|
|
1141
|
+
|
|
1142
|
+
[auth](../README.md#auth)
|
|
1143
|
+
|
|
1144
|
+
### HTTP request headers
|
|
1145
|
+
|
|
1146
|
+
- **Content-Type**: application/json
|
|
1147
|
+
- **Accept**: application/json
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
## update_document_raw
|
|
1151
|
+
|
|
1152
|
+
> <DocumentRawUpdate> update_document_raw(document_id, update_document_raw_params, opts)
|
|
1153
|
+
|
|
1154
|
+
Update Document Raw
|
|
1155
|
+
|
|
1156
|
+
### Examples
|
|
1157
|
+
|
|
1158
|
+
```ruby
|
|
1159
|
+
require 'time'
|
|
1160
|
+
require 'ragie_ruby_sdk'
|
|
1161
|
+
# setup authorization
|
|
1162
|
+
RagieRubySdk.configure do |config|
|
|
1163
|
+
# Configure Bearer authorization: auth
|
|
1164
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1165
|
+
end
|
|
1166
|
+
|
|
1167
|
+
api_instance = RagieRubySdk::DocumentsApi.new
|
|
1168
|
+
document_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the document.
|
|
1169
|
+
update_document_raw_params = RagieRubySdk::UpdateDocumentRawParams.new({data: RagieRubySdk::Data.new}) # UpdateDocumentRawParams |
|
|
1170
|
+
opts = {
|
|
1171
|
+
partition: 'partition_example' # String | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
begin
|
|
1175
|
+
# Update Document Raw
|
|
1176
|
+
result = api_instance.update_document_raw(document_id, update_document_raw_params, opts)
|
|
1177
|
+
p result
|
|
1178
|
+
rescue RagieRubySdk::ApiError => e
|
|
1179
|
+
puts "Error when calling DocumentsApi->update_document_raw: #{e}"
|
|
1180
|
+
end
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
#### Using the update_document_raw_with_http_info variant
|
|
1184
|
+
|
|
1185
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1186
|
+
|
|
1187
|
+
> <Array(<DocumentRawUpdate>, Integer, Hash)> update_document_raw_with_http_info(document_id, update_document_raw_params, opts)
|
|
1188
|
+
|
|
1189
|
+
```ruby
|
|
1190
|
+
begin
|
|
1191
|
+
# Update Document Raw
|
|
1192
|
+
data, status_code, headers = api_instance.update_document_raw_with_http_info(document_id, update_document_raw_params, opts)
|
|
1193
|
+
p status_code # => 2xx
|
|
1194
|
+
p headers # => { ... }
|
|
1195
|
+
p data # => <DocumentRawUpdate>
|
|
1196
|
+
rescue RagieRubySdk::ApiError => e
|
|
1197
|
+
puts "Error when calling DocumentsApi->update_document_raw_with_http_info: #{e}"
|
|
1198
|
+
end
|
|
1199
|
+
```
|
|
1200
|
+
|
|
1201
|
+
### Parameters
|
|
1202
|
+
|
|
1203
|
+
| Name | Type | Description | Notes |
|
|
1204
|
+
| ---- | ---- | ----------- | ----- |
|
|
1205
|
+
| **document_id** | **String** | The id of the document. | |
|
|
1206
|
+
| **update_document_raw_params** | [**UpdateDocumentRawParams**](UpdateDocumentRawParams.md) | | |
|
|
1207
|
+
| **partition** | **String** | An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition. | [optional] |
|
|
1208
|
+
|
|
1209
|
+
### Return type
|
|
1210
|
+
|
|
1211
|
+
[**DocumentRawUpdate**](DocumentRawUpdate.md)
|
|
1212
|
+
|
|
1213
|
+
### Authorization
|
|
1214
|
+
|
|
1215
|
+
[auth](../README.md#auth)
|
|
1216
|
+
|
|
1217
|
+
### HTTP request headers
|
|
1218
|
+
|
|
1219
|
+
- **Content-Type**: application/json
|
|
1220
|
+
- **Accept**: application/json
|
|
1221
|
+
|