Import a Model API
The API imports a model in chunks into the GALE environment. The import process includes the following steps and APIs:
Where can I find the API key? Learn more.
Start Import Session
The Import Model - Start Session API is executed in this step. The API initializes the import session and returns a Session Id
in the response which is used in the next two steps of the import process.
Method
|
POST
|
Endpoint
|
https://{host}/api/public/files/session/start
|
Content Type
|
application/json
|
Authorization
|
X-api-key - The API key used for authentication.
|
Path Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
REQUIRED/OPTIONAL
|
host
|
The environment URL. For example, https://gale.kore.ai
|
String
|
Required
|
Sample Request
The information will be added soon.
Body Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
REQUIRED/OPTIONAL
|
fileContext
|
Context of the file (e.g., model/dataset).
|
String
|
Required
|
totalChunks
|
The number of chunks the file is divided into.
|
Integer
|
Required
|
fileExtension
|
The extension of the file (e.g., tar).
|
String
|
Required
|
fileName
|
Name of the file being uploaded. Forr example, “example_model22.tar”
|
String
|
Required
|
fileSize
|
The size of the file in bytes.
|
Integer
|
Required
|
isAdapter
|
Indicates whether the file is an adapter model. The values include “True” or “False.”
|
Boolean
|
Optional
|
Sample Response
{
"sessionId": "dxxxxxx0-0xx2-4xx2-9xxd-5xxxxxxxxxx8",
"expirationDate": "2025-02-05T11:58:03.638Z",
"modelId": "cm-3xxxxxx6-axx6-5xx2-9xx6-0xxxxxxxxxx9"
}
Response Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
sessionId
|
The unique identifier of the import session.
|
String
|
expirationDate
|
The expiration date of the session.
|
Date
|
modelId
|
The unique identifier of the model.
|
String
|
Upload Model in Chunks
The Import Model - Chunk Upload API uploads a file chunk for model import. The sessionId
from the Start Import Session API must be used here to upload the file in incrementing chunks identified by a unique chunkNumber
.
Method
|
POST
|
Endpoint
|
https://{host}/api/public/files/session/{sessionId}
|
Content Type
|
application/json
|
Authorization
|
X-api-key - The API key used for authentication.
|
Path Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
REQUIRED/OPTIONAL
|
host
|
The environment URL. For example, https://gale.kore.ai
|
String
|
Required
|
sessionId
|
The Session Id from the start import session API.
|
String
|
Required
|
Sample Request
The information will be added soon.
Body Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
REQUIRED/OPTIONAL
|
fileContext
|
The context of the file (e.g., bulkImport ).
|
String
|
Required
|
totalChunks
|
The total number of chunks created for the file upload.
|
Number
|
Required
|
fileExtension
|
The file extension based on the file type.
|
String
|
Required
|
fileName
|
The file name.
|
String
|
Required
|
fileSize
|
The size of the file.
|
Number
|
Required
|
Sample Response
{
"chunkNumber": "0",
"sessionId": "dxxxxxx0-0xx2-4xx2-9xxd-51xxxxxxxxx8"
}
Response Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
chunkNumber
|
The uploaded chunk number.
|
Number
|
sessionId
|
The model import Session Id .
|
String
|
Complete the Import Process
The Import Model- Complete API completes the model import process after all file chunks have been successfully uploaded. The sessionId
from the Start Import Session API must be used for this API.
Method
|
POST
|
Endpoint
|
https://{host}/api/public/files/session/{sessionId}/complete
|
Content Type
|
application/json
|
Authorization
|
X-api-key - The API key used for authentication.
|
Path Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
REQUIRED/OPTIONAL
|
host
|
The environment URL. For example, https://gale.kore.ai
|
String
|
Required
|
sessionId
|
The Session Id from the Start Import Session API.
|
String
|
Required
|
Sample Request
The information will be added soon.
Body Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
REQUIRED/OPTIONAL
|
file
|
The file being uploaded.
|
File
|
Required
|
chunkNumber
|
The uploaded chunk number.
|
Number
|
Required
|
Sample Response
{
"dock-statusId": "ds-dxxxxxxd-bxx9-5xx0-8xx5-5bxxxxxxxxx1",
"modelId": "cm-3xxxxxxa-bxx9-5xxf-axxc-73xxxxxxxxx2",
"jobType": "MODELS",
"action": "EXPORT",
"status": "IN_PROGRESS"
}
Response Parameters
PARAMETER
|
DESCRIPTION
|
TYPE
|
dockstatusId
|
The unique identifier to track the status of model import.
|
String
|
modelId
|
The unique identifier of the model being imported.
|
String
|
jobType
|
Type of job being performed, i.e. MODEL
|
String
|
action
|
The action performed on the model.
|
String
|
status
|
The current status of the job (SUCCESS, IN PROGRESS, or FAILED).
|
String
|