Notes
-
Access is only possible when connected to WebSocket.
-
JSON data is exchanged through a socket message.
-
Socket message is fixed in JSON format as shown below.
{
"method": "read", // "read" or "write"
"request": "GetUploadUrl", // API Name
"param": {
"sourceFileName": "sample_dance_short.mov"
} // API Request Data Parameters. If not needed, put {}
} -
If using Postman WebSocket client, change the format of the Request Message to JSON before using it
GetUploadUrl
Request Message
{
"method": "read",
"request": "GetUploadUrl",
"param": {
"sourceFileName": "sample_dance_short.mov"
}
}
-
sourceFileName
Name of the file to be uploaded
Response Message
{
"fileKey": "video-b1262efd475b.mov",
"headers": {
"x-amz-tagging": "state=uploaded"
},
"url": "<https://~~~~~~~>"
}
-
fileKey
Used when file identifier or ExtractMotionCapture API is called
-
headers
A list of headers when uploading
-
url
Upload URL
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"sourceFileName": {
"type": "string"
}
},
"required": [
"sourceFileName"
]
}
Response JSON Schema
{
"type": "object",
"properties": {
"url": {
"type": "string"
},
"fileKey": {
"type": "string"
},
"headers": {
"type": "null"
}
},
"required": [
"url",
"fileKey",
"headers"
]
}
GetUserApiUsages
Request Message
{
"method": "read",
"request": "GetUserApiUsages",
"param": {
"startInvokedAt": "2022-05-01T07:32:25.232Z",
"endInvokedAt": "2022-10-21T07:32:25.232Z",
"apiName": "ExtractMotionCapture",
"billedDurationSec": 0,
"billedFrame": 0,
"isError": false
}
}
-
startInvokedAt optional
When the API call starts
-
endInvokedAt optional
When the API call stops
-
apiName optional
API name
-
billedDurationSec optional
Retrieves the billed video length (seconds), greater than the input value
-
billedFrame optional
Retrieves the number of billed video frames and items larger than the input value
-
isError optional
Whether if an error occurred
Response Message
[
{
"userId": "sunho@plask.ai",
"accessKeyId": "40b701476e2e1e58542b",
"apiName": "getuploadurl",
"duration": 0.132,
"invokedAt": "2022-06-17T03:39:46.047Z",
"details": {
"billedFrame": 0,
"billedDurationSec": 0,
"isMultiPerson": false
},
"version": 0,
"error": "",
"sourceIp": "218.153.177.209"
},
...
]
-
apiName
The name of the called API
-
duration
Processing time of the called API, in seconds
-
details
-
billedFrame
Billed number of frames
-
billedDurationSec
Billed length of the video file (in seconds)
-
isMultiPerson
Whether MultiPerson mocap is used or not
-
-
error
Error message
-
sourceIp
Called client's IP address
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"startInvokedAt": {
"type": "string"
},
"endInvokedAt": {
"type": "string"
},
"isError": {
"type": "boolean"
},
"apiName": {
"type": "string"
},
"billedDurationSec": {
"type": "integer"
},
"billedFrame": {
"type": "integer"
}
}
}
Response JSON Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"accessKeyId": {
"type": "string"
},
"apiName": {
"type": "string"
},
"duration": {
"type": "integer"
},
"invokedAt": {
"type": "string"
},
"billedDurationSec": {
"type": "integer"
},
"version": {
"type": "integer"
},
"error": {
"type": "string"
},
"sourceIp": {
"type": "string"
}
},
"required": [
"userId",
"accessKeyId",
"apiName",
"duration",
"invokedAt",
"billedDurationSec",
"version",
"error",
"sourceIp"
]
}
}
GetMotionFileDownloadUrl
Request Message
{
"method": "read",
"request": "GetMotionFileDownloadUrl",
"param": {
"motionFileKey": "motion-bc0033f1c25d.json"
}
}
-
motionFileKey
Identifier of the motion file to be downloaded
Response Message
{
"url": "~~~"
}
-
url
Motion file download URL
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"motionFileKey": {
"type": "string"
}
},
"required": [
"motionFileKey"
]
}
Response JSON Schema
{
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
}
GetMocapResults
Request Message
{
"method": "read",
"request": "GetMocapResults",
"param": {
"isError": false
}
}
-
isError optional
Whether error occured or not
Response Message
[
{
"videoFileKey": "video-3d1db1f00398.mov",
"motionFileKey": "motion-3d1db1f00398.json",
"userId": "limchangi@plask.ai",
"createdAt": "2022-10-06T07:12:09.212Z",
"elapsedSec": 18.23,
"details": {
"videoLengthSec": 5.113333,
"withTpose": true,
"withFootlock": true,
"isMultiPerson": false,
"videoFrames": 154
},
"isError": "false",
"error": ""
}
]
-
videoFileKey
Motion capture input video file identifier
-
motionFileKey
Extracted motion capture file identifier
-
createdAt
Created time
-
elapsedSec
Elapsed time to capture motion
-
details
-
isMultiPerson
Whether MultiPerson mocap was used or not
-
videoFrames
The frame rate of video file used as input
-
videoLengthSec
The input video file's length in seconds
-
-
isError
Whether error occured or not
-
error
Error message
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"isError": {
"type": "boolean"
}
}
}
Response JSON Schema
{
"type": "array",
"items": {
"type": "object",
"properties": {
"videoFileKey": {
"type": "string"
},
"motionFileKey": {
"type": "string"
},
"userId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"elapsedSec": {
"type": "integer"
},
"details": {
"videoLengthSec": {
"type": "integer"
},
"withTpose": {
"type": "boolean"
},
"withFootlock": {
"type": "boolean"
},
"isMultiPerson": {
"type": "boolean"
},
"videoFrames": {
"type": "integer"
},
},
"isError": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": [
"videoFileKey",
"motionFileKey",
"userId",
"createdAt",
"elapsedSec",
"details",
"isError",
"error"
]
}
}
GetMocapResult
Request Message
{
"method": "read",
"request": "GetMocapResult",
"param": {
"sourceFileKey": "video-3d1db1f00398.mov"
}
}
-
sourceFileKey
Input video file identifier
Response Message
{
"videoFileKey": "video-3d1db1f00398.mov",
"motionFileKey": "motion-3d1db1f00398.json",
"userId": "limchangi@plask.ai",
"createdAt": "2022-10-06T07:12:09.212Z",
"elapsedSec": 18.23,
"details": {
"videoLengthSec": 5.113333,
"withTpose": true,
"withFootlock": true,
"isMultiPerson": false,
"videoFrames": 154
},
"isError": "false",
"error": ""
}
-
videoFileKey
Motion capture input video file identifier
-
motionFileKey
Motion capture output motion file identifier
-
createdAt
Created time
-
elapsedSec
Elapsed time to capture motion
-
details
-
isMultiPerson
Whether MultiPerson mocap was used or not
-
videoFrames
Frame count of the input video file
-
videoLengthSec
Input video file length in seconds
-
-
isError
Whether error occured or not
-
error
Error message
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"sourceFileKey": {
"type": "string"
}
},
"required": [
"sourceFileKey"
]
}
Response JSON Schema
{
"type": "object",
"properties": {
"videoFileKey": {
"type": "string"
},
"motionFileKey": {
"type": "string"
},
"userId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"elapsedSec": {
"type": "integer"
},
"details": {
"videoLengthSec": {
"type": "integer"
},
"withTpose": {
"type": "boolean"
},
"withFootlock": {
"type": "boolean"
},
"isMultiPerson": {
"type": "boolean"
},
"videoFrames": {
"type": "integer"
},
},
"isError": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": [
"videoFileKey",
"motionFileKey",
"userId",
"createdAt",
"elapsedSec",
"details",
"isError",
"error"
]
}
GetAccessKeyLastUsed
Request Message
{
"method": "read",
"request": "GetAccessKeyLastUsed",
"param": {
"accessKeyId": "40b701476e2e1e58542b"
}
}
-
accessKeyId
Accesskey ID to search
Response Message
{
"lastUsedDate": "2022-06-20T07:31:41.696Z"
}
-
lastUsedDate
Last used date
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"accessKeyId": {
"type": "string"
}
},
"required": [
"accessKeyId"
]
}
Response JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"lastUsedDate": {
"type": "string"
}
},
"required": [
"lastUsedDate"
]
}
CreateAccessKey
Request Message
{
"method": "write",
"request": "CreateAccessKey",
"param": {}
}
Response Message
{
"commandId": "b7937988d71275d4d34a70cce0f55b6d",
"commandStatus": "finished",
"result": {
"accessKeyId": "34fedc4ca79e4229d716",
"secretKey": "4fedc4ca79e4229d71662aca2e91e4a94e449ff4"
}
}
-
commandId
Request command ID
-
commandStatus
Request command status:
- unknown
- open: command execution on hold
- working: Command is being executed
- finished: Command is executed
-
result
-
accessKeyId
Generated access key Id
-
secretKey
Generated secret key ID - can be seen only when being created
-
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object"
}
Response JSON Schema
{
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"commandStatus": {
"type": "string"
},
"result": {
"type": "object",
"properties": {
"accessKeyId": {
"type": "string"
},
"secretKey": {
"type": "string"
}
},
"required": [
"accessKeyId",
"secretKey"
]
},
"error": {
"type": "string"
}
},
"required": [
"commandId",
"commandStatus",
"result"
]
}
DeleteAccessKey
Request Message
{
"method": "write",
"request": "DeleteAccessKey",
"param": {
"accessKeyId": "c3df7f62e4cf7acfea80"
}
}
-
accessKeyId
Access key Id
Response Message
{
"commandId": "7937988d71275d4d34a70cce0f55b6dd",
"commandStatus": "finished",
"result": {}
}
-
commandId
Request command Id
-
commandStatus
Request command status:
- unknown
- open: command execution on hold
- working: Command is being executed
- finished: Command is executed
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"accessKeyId": {
"type": "string"
}
},
"required": [
"accessKeyId"
]
}
Response JSON Schema
{
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"commandStatus": {
"type": "string"
},
"result": {
"type": "object"
},
"error": {
"type": "string"
}
},
"required": [
"commandId",
"commandStatus",
"result",
"error"
]
}
UpdateAccessKey
Request Message
{
"method": "write",
"request": "UpdateAccessKey",
"param": {
"accessKeyId": "d4f1fe542df58cfb58ba",
"status": "active"
}
}
-
accessKeyId
Access key Id
-
status
Status to be adjusted into
- active
- inactive
Response Message
{
"commandId": "7988d71275d4d34a70cce0f55b6dd8e7",
"commandStatus": "finished",
"result": {
"accessKeyId": "d4f1fe542df58cfb58ba",
"status": "active"
}
}
-
commandId
Request command Id
-
commandStatus
Request command status:
- unknown
- open: command execution on hold
- working: Command is being executed
- finished: Command is executed
-
result
-
accessKeyId
Access key ID
-
status
Adjusted status
-
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"accessKeyId": {
"type": "string"
},
"status": {
"type": "string",
"enum": ["active", "inactive"]
}
},
"required": [
"accessKeyId",
"status"
]
}
Response JSON Schema
{
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"commandStatus": {
"type": "string"
},
"result": {
"type": "object",
"properties": {
"accessKeyId": {
"type": "string"
},
"status": {
"type": "string"
}
},
"required": [
"accessKeyId",
"status"
]
},
"error": {
"type": "string"
}
},
"required": [
"commandId",
"commandStatus",
"result",
"error"
]
}
ExtractMotionCapture
Request Message
{
"method": "write",
"request": "ExtractMotionCapture",
"param": {
"fileKey": "video-3d1db1f00398.mov",
"notificationId": "",
"trackingType": "single",
"withFootlock": true,
"withTpose": true
}
}
-
fileKey
File identifier of the video to be converted to motion capture
- FileKey received as GetUploadUrl API's response
-
trackingType (string) optional
Whether if multi person mocap will be used or not
- single | multi default = single
-
withFootlock (boolean) optional
Whether the Foot-Lock function will be used or not
default = false
-
withTpose (boolean) optional
Whether the T-Pose will be used in frame 0
default = false
Response Message - 1st
{
"commandId": "988d71275d4d34a70cce0f55b6dd8e7c",
"commandStatus": "working"
}
-
commandId
Request command Id
-
commandStatus
Request process command status:
- unknown
- open: command execution on hold
- working: Command is being executed
- finished: Command is executed
Mocap started if the command works without error
-
result optional
-
error
Motion capture operation start error message
-
Response Message - 2nd
{
"videoFileKey": "video-3d1db1f00398.mov",
"motionFileKey": "motion-3d1db1f00398.json",
"userId": "limchangi@plask.ai",
"createdAt": "2022-10-06T07:12:09.212Z",
"elapsedSec": 18.23,
"details": {
"videoLengthSec": 5.113333,
"withTpose": true,
"withFootlock": true,
"isMultiPerson": false,
"videoFrames": 154
},
"isError": "false",
"error": ""
}
-
videoFileKey
Motion capture input video file identifier
-
motionFileKey
Motion capture output motion file identifier
-
createdAt
Created time
-
elapsedSec
Time elapsed to capture motion
-
details
-
isMultiPerson
Whether MultiPerson option is used or not
-
videoFrames
The number of frames in the input video file
-
videoLengthSec
The length of input video file in secods
-
withTpose
Whether Tpose start option is used or not
-
withFootlock
Whether the Footlock function is used or not
-
-
isError
Whether if an error occured or not
-
error
Error message에러 내용
Request JSON Schema
{
"$schema": "<http://json-schema.org/draft-04/schema#>",
"type": "object",
"properties": {
"fileKey": {
"type": "string"
},
"notificationId": {
"type": "string"
}
},
"required": [
"fileKey"
]
}
Response JSON Schema - 1st
{
"type": "object",
"properties": {
"commandId": {
"type": "string"
},
"commandStatus": {
"type": "string"
},
"result": {
"type": "object",
"properties": {
"sourceFileKey": {
"type": "null"
},
"commandId": {
"type": "null"
},
"motionFileKey": {
"type": "null"
},
"videoLengthSec": {
"type": "null"
},
"elapsedSec": {
"type": "null"
},
"error": {
"type": "null"
}
},
"required": [
"sourceFileKey",
"commandId",
"motionFileKey",
"videoLengthSec",
"elapsedSec",
"error"
]
},
"error": {
"type": "string"
}
},
"required": [
"commandId",
"commandStatus"
]
}
Response JSON Schema - 2nd
{
"type": "object",
"properties": {
"videoFileKey": {
"type": "string"
},
"motionFileKey": {
"type": "string"
},
"userId": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"elapsedSec": {
"type": "integer"
},
"details": {
"videoLengthSec": {
"type": "integer"
},
"withTpose": {
"type": "boolean"
},
"withFootlock": {
"type": "boolean"
},
"isMultiPerson": {
"type": "boolean"
},
"videoFrames": {
"type": "integer"
},
},
"isError": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": [
"videoFileKey",
"motionFileKey",
"userId",
"createdAt",
"elapsedSec",
"details",
"isError",
"error"
]
}