diff --git a/api/cache/file_cache.go b/api/cache/file_cache.go
index 8cb8fe894..f52cd0bc9 100644
--- a/api/cache/file_cache.go
+++ b/api/cache/file_cache.go
@@ -67,6 +67,17 @@ func (c *FileCache) Refresh(id string) (model.File, error) {
return res, nil
}
+func (c *FileCache) RefreshWithExisting(file model.File, userID string) (model.File, error) {
+ err := c.fileRepo.PopulateModelFieldsForUser([]model.File{file}, userID)
+ if err != nil {
+ return nil, err
+ }
+ if err = c.Set(file); err != nil {
+ return nil, err
+ }
+ return file, nil
+}
+
func (c *FileCache) Delete(id string) error {
if err := c.redis.Delete(c.keyPrefix + id); err != nil {
return nil
diff --git a/api/docs/index.html b/api/docs/index.html
index dc4fb422b..a6f58da66 100644
--- a/api/docs/index.html
+++ b/api/docs/index.html
@@ -12,352 +12,352 @@
margin: 0;
}
-
-
+ " fill="currentColor">
Voltaserve API (2.0.0)
Download OpenAPI specification:Download
Delete
Request Body schema: application/json
required
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Create
query Parameters
type required | |
workspace_id required | |
parent_id | |
name | |
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Copy One
path Parameters
id required | |
targetId required | |
/v2/files/{id}/copy/{targetId}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
/v2/files/{id}/group_permissions
Response samples
Content typeapplication/json
[{"group":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"updateTime": "string"
}, "id": "string",
"permission": "string"
}
]
List
query Parameters
type | |
page | |
size | |
sort_by | |
sort_order | |
query | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
], "page": 0,
"query":
{"createTimeAfter": 0,
"createTimeBefore": 0,
"text": "string",
"type": "file",
"updateTimeAfter": 0,
"updateTimeBefore": 0
}, "size": 0,
"totalElements": 0,
"totalPages": 0
}
Move
Request Body schema: application/json
required
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Patch Name
Request Body schema: application/json
required
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Download Original
query Parameters
access_token required | |
ext required | |
/v2/files/{id}/original{ext}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Patch from S3
query Parameters
api_key required | |
access_token required | |
s3_key required | |
s3_bucket required | |
size required | |
/v2/files/{id}/patch_from_s3
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Response samples
Content typeapplication/json
[{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
]
Download Preview
query Parameters
access_token required | |
ext required | |
/v2/files/{id}/preview{ext}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Revoke Group Permission
Revoke Group Permission
+
Request Body schema: application/json
required
groupId required | |
ids required | |
/v2/files/{id}/revoke_group_permission
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
Download Thumbnail
query Parameters
access_token required | |
ext required | |
/v2/files/{id}/thumbnail{ext}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
/v2/files/{id}/user_permissions
Response samples
Content typeapplication/json
[{"id": "string",
"permission": "string",
"user":
{"createTime": "string",
"email": "string",
"fullName": "string",
"id": "string",
"picture": "string",
"updateTime": "string",
"username": "string"
}
}
]
Copy Many
Request Body schema: application/json
required
sourceIds required | |
targetId required | |
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
Create from S3
query Parameters
api_key required | |
access_token required | |
workspace_id required | |
parent_id | |
name | |
s3_key required | |
s3_bucket required | |
size required | |
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
Grant Group Permission
Request Body schema: application/json
required
groupId required | |
ids required | |
permission required | string Enum: "viewer" "editor" "owner" |
/v2/files/grant_group_permission
Request samples
Content typeapplication/json
{"groupId": "string",
"permission": "viewer"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Grant User Permission
Request Body schema: application/json
required
ids required | |
permission required | string Enum: "viewer" "editor" "owner" |
userId required | |
/v2/files/grant_user_permission
Request samples
Content typeapplication/json
{"permission": "viewer",
"userId": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
[{"createTime": "string",
"id": "string",
"isShared": true,
"name": "string",
"parentId": "string",
"permission": "string",
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}, "type": "string",
"updateTime": "string",
"workspaceId": "string"
}
]
Revoke User Permission
Request Body schema: application/json
required
ids required | |
userId required | |
/v2/files/revoke_user_permission
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
List
query Parameters
query | |
organization_id | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"updateTime": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
Create
Request Body schema: application/json
required
image | |
name required | |
organizationId required | |
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"updateTime": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"updateTime": "string"
}
Remove Member
Request Body schema: application/json
required
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Patch Name
Request Body schema: application/json
required
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"updateTime": "string"
}
Response samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Create
Request Body schema: application/json
required
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
List Entities
query Parameters
query | |
page | |
size | |
sort_by | |
sort_order | |
/v2/insights/{id}/entities
Response samples
Content typeapplication/json
[{"data":
[{"frequency": 0,
"label": "string",
"text": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
]
Response samples
Content typeapplication/json
{"isAvailable": true,
"isOutdated": true,
"snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}
}
Download OCR
query Parameters
access_token required | |
ext required | |
/v2/insights/{id}/ocr{ext}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Download Text
query Parameters
access_token required | |
ext required | |
/v2/insights/{id}/text{ext}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
[{"id": "string",
"iso6393": "string",
"name": "string"
}
]
Create
Request Body schema: application/json
required
emails required | |
organizationId required | |
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
/v2/invitations/{id}/accept
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
/v2/invitations/{id}/decline
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
/v2/invitations/{id}/resend
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Get Incoming
query Parameters
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"email": "string",
"id": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "owner":
{"createTime": "string",
"email": "string",
"fullName": "string",
"id": "string",
"picture": "string",
"updateTime": "string",
"username": "string"
}, "status": "string",
"updateTime": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
/v2/invitations/incoming/count
Response samples
Content typeapplication/json
Get Outgoing
query Parameters
organization_id required | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"email": "string",
"id": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "owner":
{"createTime": "string",
"email": "string",
"fullName": "string",
"id": "string",
"picture": "string",
"updateTime": "string",
"username": "string"
}, "status": "string",
"updateTime": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"isAvailable": true,
"isOutdated": true,
"metadata":
{"extension": "string",
"height": 0,
"width": 0,
}, "snapshot":
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}
}
Download Tile
path Parameters
id required | |
zoom_level required | |
row required | |
col required | |
/v2/mosaics/{id}/zoom_level/{zoom_level}/row/{row}/col/{col}/ext/{ext}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
List
query Parameters
query | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
Create
Request Body schema: application/json
required
Request samples
Content typeapplication/json
{"image": "string",
"name": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}
/v2/organizations/{id}/leave
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Remove Member
Request Body schema: application/json
required
/v2/organizations/{id}/members
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Patch Name
Request Body schema: application/json
required
/v2/organizations/{id}/name
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}
List
query Parameters
file_id required | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
Patch
Request Body schema: application/json
required
| |
fields | |
| |
| |
| object (client.PipelineRunOptions) |
| |
| |
status | |
taskId | |
| |
| |
Request samples
Content typeapplication/json
{"entities":
{"bucket": "string",
"key": "string",
"size": 0
}, "mosaic":
{"bucket": "string",
"key": "string",
"size": 0
}, "ocr":
{"bucket": "string",
"key": "string",
"size": 0
}, "options":
{"bucket": "string",
"key": "string",
"payload":
{"property1": "string",
"property2": "string"
}, "pipelineId": "string",
"snapshotId": "string",
"taskId": "string"
}, "original":
{"bucket": "string",
"key": "string",
"size": 0
}, "preview":
{"bucket": "string",
"key": "string",
"size": 0
}, "status": "string",
"taskId": "string",
"text":
{"bucket": "string",
"key": "string",
"size": 0
}, "thumbnail":
{"bucket": "string",
"key": "string",
"size": 0
}
}
Response samples
Content typeapplication/json
{"createTime": "string",
"entities":
{"extension": "string",
"size": 0
}, "id": "string",
"isActive": true,
"language": "string",
"mosaic":
{"extension": "string",
"size": 0
}, "ocr":
{"extension": "string",
"size": 0
}, "original":
{"extension": "string",
"size": 0
}, "preview":
{"extension": "string",
"size": 0
}, "status": "string",
"task":
{"id": "string",
"isPending": true
}, "text":
{"extension": "string",
"size": 0
}, "thumbnail":
{"extension": "string",
"size": 0
}, "updateTime": "string",
"version": 0
}
Activate
Request Body schema: application/json
required
/v2/snapshots/{id}/activate
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Detach
Request Body schema: application/json
required
/v2/snapshots/{id}/detach
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
/v2/storage/account_usage
Response samples
Content typeapplication/json
{"bytes": 0,
"maxBytes": 0,
"percentage": 0
}
Response samples
Content typeapplication/json
{"bytes": 0,
"maxBytes": 0,
"percentage": 0
}
/v2/storage/workspace_usage
Response samples
Content typeapplication/json
{"bytes": 0,
"maxBytes": 0,
"percentage": 0
}
List
query Parameters
query | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"error": "string",
"id": "string",
"isIndeterminate": true,
"name": "string",
"payload":
{"property1": "string",
"property2": "string"
}, "percentage": 0,
"status": "string",
"updateTime": "string",
"userId": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
Create
Request Body schema: application/json
required
error | |
isIndeterminate | |
name | |
percentage | |
userId | |
Request samples
Content typeapplication/json
{"error": "string",
"isIndeterminate": true,
"name": "string",
"percentage": 0,
"userId": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"error": "string",
"id": "string",
"isIndeterminate": true,
"name": "string",
"payload":
{"property1": "string",
"property2": "string"
}, "percentage": 0,
"status": "string",
"updateTime": "string",
"userId": "string"
}
Patch
Request Body schema: application/json
required
error | |
fields | |
isIndeterminate | |
name | |
| |
percentage | |
status | |
userId | |
Request samples
Content typeapplication/json
{"error": "string",
"isIndeterminate": true,
"name": "string",
"payload":
{"property1": "string",
"property2": "string"
}, "percentage": 0,
"status": "string",
"userId": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"error": "string",
"id": "string",
"isIndeterminate": true,
"name": "string",
"payload":
{"property1": "string",
"property2": "string"
}, "percentage": 0,
"status": "string",
"updateTime": "string",
"userId": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
List
query Parameters
query | |
organization_id | |
group | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"email": "string",
"fullName": "string",
"id": "string",
"picture": "string",
"updateTime": "string",
"username": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
List
query Parameters
query | |
page | |
size | |
sort_by | |
sort_order | |
Response samples
Content typeapplication/json
{"data":
[{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"rootId": "string",
"storageCapacity": 0,
"updateTime": "string"
}
], "page": 0,
"size": 0,
"totalElements": 0,
"totalPages": 0
}
Create
Request Body schema: application/json
required
image | |
name required | |
organizationId required | |
storageCapacity | |
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"rootId": "string",
"storageCapacity": 0,
"updateTime": "string"
}
Response samples
Content typeapplication/json
{"code": "string",
"message": "string",
"moreInfo": "string",
"status": 0,
"userMessage": "string"
}
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"rootId": "string",
"storageCapacity": 0,
"updateTime": "string"
}
Patch Storage Capacity
Request Body schema: application/json
required
/v2/workspaces/{id}/storage_capacity
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"rootId": "string",
"storageCapacity": 0,
"updateTime": "string"
}
Patch Name
Request Body schema: application/json
required
/v2/workspaces/{id}/update_name
Request samples
Content typeapplication/json
Response samples
Content typeapplication/json
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"organization":
{"createTime": "string",
"id": "string",
"image": "string",
"name": "string",
"permission": "string",
"updateTime": "string"
}, "permission": "string",
"rootId": "string",
"storageCapacity": 0,
"updateTime": "string"
}