Skip to main content

Sharing

Introduction

In AI DIAL, resources refers to conversations, prompts, files, and applications. When a resource is created or uploaded to DIAL, it is stored in a dedicated storage bucket. You can share these resources with other users or applications. The sharing functionality is available through both the DIAL API and the AI DIAL Chat UI.

DIAL API

There are two sides in the sharing process: the resource owner and the resource recipient. AI DIAL Sharing API has endpoints to facilitate workflows for either of them.

Endpoints for resource owners

  • /create: resource owners can use this endpoint to share a resource by creating an invitationLink which includes an invitationId. On top of that, you can grant read or write access to your resource. Note: If an app/user changes the shared resource, HTTP etag is used by AI DIAL Core to determine versioning and resolve conflicts. You can use Subscription API to get notifications about changes made by other users or applications. Refer to DIAL API to view examples. Limitations: the system does not support getting all the recipients of a shared resource.
  • /copy: this endpoint is used you need to add permissions to users for a new resource. For example, if you have a conversation with attachments that has been shared, and you decide to add another attachment, this endpoint ensures that other users can access the updated shared resource with the new attachment included.
  • /list: use this endpoint to query the details of all resources that were shared by you. In the request body, provide others as with parameter value to do that. Refer to DIAL API to view examples. Note, that in case you share a conversation with attachments, attachments are shared as well, but they will appear in the response as a separate shared resources.
  • /revoke: this endpoint is used when you need to stop sharing a resource. By using this endpoint to unshare a resource, the shared content becomes inaccessible to all recipients who previously had access, and any invitation link associated with it will no longer be valid for future use. Refer to DIAL API to view examples.
  • /invitations: invitations are created together with sharing resources using /create endpoint. Use /invitations endpoint to query a list of all active invitations you have created. Refer to DIAL API to view examples.
  • /invitations/{Invitation ID}: use this endpoint with the DELETE method to revoke invitations. Refer to DIAL API to view examples.

Endpoints for resource recipients

  • /discard: recipients of a shared resource can use this endpoint to stop using shared resources. In this case, related resources will stop being marked as shared for the resource owner. Refer to DIAL API to view examples.
  • /list: use this endpoint to query the details of all resources that were shared with you. In the request body, provide me as with parameter value to do that. Refer to DIAL API to view examples.
  • /invitations/{Invitation ID}: use this endpoint with the GET method to view invitation details and to accept an invitation. Refer to DIAL API to view examples.

Workflow Examples

Basic workflow

  1. Resource owner shares a resource using the /create and provides the invitation link for the resource recipient.
  2. Resource recipient extracts the invitation id from the invitation link calls the /invitations/{Invitation ID} endpoint to accept the resource.
  3. Resource recipient can now get the list of shared resources with their details via /list.

Revoke workflow

  1. Resource owner shares a resource via /create and provides the invitation link for the resource recipient.
  2. Resource recipient extracts the invitation id from the invitation link and calls the /invitations/{Invitation ID} to accept the resource.
  3. Resource owner revokes access to the shared resource via /revoke.
  4. Resource recipient cannot access the shared resource any longer.

DIAL Chat

Chat users can share their resources with others, accept sharing invitations, and view resources that have been shared by or with them. When conversations that include attachments are shared, all attachments are also shared and can be accessed through the chat file manager.

Refer to AI DIAL Chat user guide for details: