Model Shares
Model Shares
GET /api/v1/models/{id}/share
Get Shares
Parameters
| Name | In | Type | Required |
|---|---|---|---|
id | path | string | true |
Response
Type: []ShareInfo
| Field | Type | Description |
|---|---|---|
share_id | string | |
user_id | string | |
firstname | string | |
name | string | |
email | string | |
request_user_id | string | The userID that shares |
role_id | string | |
role_name | string | |
role_slug | string | |
is_pending | bool | |
is_owner | bool |
Example
curl -X GET \
-H "Authorization: Bearer <token>" \
https://api.seeme.ai/api/v1/models/{id}/sharePOST /api/v1/models/{id}/share
Create Share
Parameters
| Name | In | Type | Required |
|---|---|---|---|
id | path | string | true |
Request Body
Type: Share
| Field | Type | Description |
|---|---|---|
id | uuid.UUID | |
created_at | time.Time | |
updated_at | time.Time | |
user_id | uuid.UUID | The userID it is shared with |
email | string | |
entity_id | string | |
entity_version_id | string | |
request_user_id | string | The userID that shares |
entity_type | string | |
without_invite | bool | Do not send an email invitation |
role_id | string | Optional: role for granular permissions (defaults to viewer) |
token | string | Invite fields (for new-user invite flow) (optional) |
expires_at | time.Time | (optional) |
accepted_at | time.Time | (optional) |
role | Role | Relationships (optional) |
Response
Type: Share
| Field | Type | Description |
|---|---|---|
id | uuid.UUID | |
created_at | time.Time | |
updated_at | time.Time | |
user_id | uuid.UUID | The userID it is shared with |
email | string | |
entity_id | string | |
entity_version_id | string | |
request_user_id | string | The userID that shares |
entity_type | string | |
without_invite | bool | Do not send an email invitation |
role_id | string | Optional: role for granular permissions (defaults to viewer) |
token | string | Invite fields (for new-user invite flow) (optional) |
expires_at | time.Time | (optional) |
accepted_at | time.Time | (optional) |
role | Role | Relationships (optional) |
Example
curl -X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{}' \
https://api.seeme.ai/api/v1/models/{id}/sharePUT /api/v1/models/{id}/share/{share_id}
Update Share
putShare updates a share’s role
Parameters
| Name | In | Type | Required |
|---|---|---|---|
id | path | string | true |
share_id | path | string | true |
Request Body
Type: struct{}
Example
curl -X PUT \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{}' \
https://api.seeme.ai/api/v1/models/{id}/share/{share_id}DELETE /api/v1/models/{id}/share/{share_id}
Delete Share
func deleteShare(db *gorm.DB, entityType string) http.HandlerFunc {
Parameters
| Name | In | Type | Required |
|---|---|---|---|
id | path | string | true |
share_id | path | string | true |
Example
curl -X DELETE \
-H "Authorization: Bearer <token>" \
https://api.seeme.ai/api/v1/models/{id}/share/{share_id}