Job Operations

Good to know: All job operation interfaces need to use token as the request header.

Creating jobs

Creating a privacy computing job

POST https://www.phoenix.global/sdk/computation/panel/createJobByInput

Create a privacy computing job. The computation data of the job is input through the keyboard.

Headers

Request Body

{
    "code": 200,
    "msg": "success",
    "jobID": "82432641958147347699879957611773176975645610459935361780929612748304054178070"
}

The usage of curl and golang sdk is as follows:

curl --location 'https://www.phoenix.global/sdk/computation/panel/createJobByInput' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IkxKTDJAMTYzLmNvbSIsImV4cCI6MTY3ODM0ODkwMX0.OAia1TMt31EOGuvbt5SjspiACNiWfgmDeTVpwG6pP9c' \
--header 'Content-Type: application/json' \
--data-raw '{
  "computation": "Matrix Addition",
  "input": "[[18,34,18.2]]",
  "jobName": "matrix addition job Test",
  "parties": [
    "xxxxxx@gmail.com",
    "xxxxxx@gmail.com",
    "xxxxxx@gmail.com"
  ]
}'

Creating a machine learning classification job

POST https://www.phoenix.global/sdk/computation/panel/createJobByFile

Create a machine learning classification job. The participant of the job is the creator.

Headers

Request Body

{
    "code": 200,
    "msg": "success",
    "jobID": "15336929879565052031766977071313450079096374296015479727460579121350576553341"
}

The usage of curl and golang sdk is as follows:

curl --location 'https://www.phoenix.global/sdk/computation/panel/createJobByFile' \
--header 'token: xxxxxxxxxxxx' \
--form 'computation="Decision Tree"' \
--form 'jobName="decision tree" test"' \
--form 'featureData=@"feature dataset file path"' \
--form 'targetData=@"target dataset file path"' \
--form 'testingData=@"testing dataset file path"'

Creating a machine learning clustering job

POST https://www.phoenix.global/sdk/computation/panel/createJobByFile

Create a machine learning clustering job, which only needs to upload a feature dataset file.

Headers

Request Body

{
    "code": 200,
    "msg": "success",
    "jobID": "15336929879565052031766977071313450079096374296015479727460579121350576553341"
}

The usage of curl and golang sdk is as follows:

curl --location 'https://www.phoenix.global/sdk/computation/panel/createJobByFile' \
--header 'token: xxxxxx' \
--form 'computation="Birch Clustering"' \
--form 'jobName="birch clustering job test"' \
--form 'featureData=@"feature dataset path"'

Filling data

Filling in the computation data for the job of input type

POST https://www.phoenix.global/sdk/computation/panel/fillData

Fill data for job of input type. The user who fills in the data must be a participant of the job.

Headers

Request Body

{
    "code": 200,
    "msg": "fill success"
}

The usage of curl and golang sdk is as follows:

curl --location 'https://www.phoenix.global/sdk/computation/panel/fillData' \
--header 'token: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
  "input": "[[1,2,3.2]]",
  "jobID": "xxxxxx"
}
'

Deleting job

Deleting job by job id

POST https://www.phoenix.global/sdk/computation/panel/deleteJobByUser

Delete a job according to job id. Only the creator has permission to delete

Headers

Request Body

{
    "code": 200,
    "msg": "delete success"
}
curl --location 'https://www.phoenix.global/sdk/computation/panel/deleteJobByUser' \
--header 'token: xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
  "jobID": "xxxxxx"
}
'