Link connector API (2.2.0)

Download OpenAPI specification:Download

Task API

Communication APIs


The webservice list end points for

  • jobs to be submitted to LINK(s)

  • fetching submitted job result and step

  • Link(s) to upload job result

  • Link(s) to download job packets and upload results


Workflow for LINK(s)


Step 1: Download job packet


Communication API task clients can down the next distribution code jobs by using the end point

GET /task/nextjob/{collectionId}

Step 2: Upload job results to Communication API webservice


LINK(s) need to return the distribution code job results with the following communication APIs end points

POST /task/resultfile/{uuid}/{collectionId}

POST /task/result/{uuid}/{collectionid}

The above endpoints needs to used as the follows

Workflow 1: When response file content is large or has sensitive data


Step 1: upload large result file(s) or sensitive data file(s) with the following end point

/task/resultfile/{uuid}/{collectionId}

Step 2: Post json "result" payload with the following end point, where, setting "query_result.files" to empty array

/task/result/{uuid}/{collectionid}

Workflow 2: When response file content is not large or does not have sensitive data


Post json "Result" payload by setting response file as base64 encoded string to json key "query_result.files.file_data"

/task/result/{uuid}/{collectionid}

How to encode response file with base64 encoding and set "query_result.files.file_data" with encoded data?
For example,

➜ cat demographics.distribution
BIOBANK CODE DESCRIPTION COUNT MIN Q1 MEDIAN MEAN Q3 MAX ALTERNATIVES DATASET OMOP OMOP_DESCR CATEGORY
FI_DEMOCOL1 SEX Sex 984 ^Male|452^Female|532^ person NA NA Demographic
FI_DEMOCOL1 GENOMICS Genomics data 1005 ^No|1005^Imputed whole genome data|0^ personNA NA Demographic

➜ base64 demographics.distribution
QklPQkFOSwlDT0RFCURFU0NSSVBUSU9OCUNPVU5UCU1JTglRMQlNRURJQU4JTUVBTglRMwlNQVgJQUxURVJOQVRJVkVTCURBVEFTRVQJT01PUAlPTU9QX0RFU0NSCUNBVEVHT1JZCkZJX0RFTU9DT0wxCVNFWAlTZXgJOTg0CQkJCQkJCV5NYWxlfDQ1Ml5GZW1hbGV8NTMyXglwZXJzb24JTkEJTkEJRGVtb2dyYXBoaWMKRklfREVNT0NPTDEJR0VOT01JQ1MJR2Vub21pY3MgZGF0YQkxMDA1CQkJCQkJCV5Ob3wxMDA1XkltcHV0ZWQgd2hvbGUgZ2Vub21lIGRhdGF8MF4JcGVyc29uCU5BCU5BCURlbW9ncmFwaGljCg==

In json response payload:
query_result.files.file_data="QklPQkFOSwlDT0RFCURFU0NSSVBUSU9OCUNPVU5UCU1JTglRMQlNRURJQU4JTUVBTglRMwlNQVgJQUxURVJOQVRJVkVTCURBVEFTRVQJT01PUAlPTU9QX0RFU0NSCUNBVEVHT1JZCkZJX0RFTU9DT0wxCVNFWAlTZXgJOTg0CQkJCQkJCV5NYWxlfDQ1Ml5GZW1hbGV8NTMyXglwZXJzb24JTkEJTkEJRGVtb2dyYXBoaWMKRklfREVNT0NPTDEJR0VOT01JQ1MJR2Vub21pY3MgZGF0YQkxMDA1CQkJCQkJCV5Ob3wxMDA1XkltcHV0ZWQgd2hvbGUgZ2Vub21lIGRhdGF8MF4JcGVyc29uCU5BCU5BCURlbW9ncmFwaGljCg=="

Submit new job packet

Request Body schema: application/json
application
required
string
input
required
object (JsonNode)

Responses

Request samples

Content type
application/json
{
  • "application": "AVAILABILITY_QUERY",
  • "input": { }
}

Fetch next job from queue

path Parameters
collectionId
required
string

Responses

Upload job result by UUID and collectionId

Workflow 1:

Post json "Result"

Workflow 2:

Post json "Result" payload by setting response file as base64 encoded string to json key "query_result.files.file_data"

path Parameters
uuid
required
string
collectionId
required
string
Request Body schema: application/json
collection_id
required
string

The collection identifier for which the results are returned

message
string

Message returned for the from the connected LINK

protocolVersion
required
string

The version of the protocol that created this response JSON object.

object (QueryResult)
status
required
string

The step is either ok or failure. In case of ok, the element query_results is included. In case of error, error element is included. Error is caused by Collection backend coming up with error when attempting to resolve the availability query. Value Text “ok”|”error”

uuid
required
string

The unique identifier of the job for which the results are returned

Responses

Request samples

Content type
application/json
{
  • "collection_id": "string",
  • "message": "string",
  • "protocolVersion": "V2",
  • "queryResult": {
    },
  • "status": "OK",
  • "uuid": "string"
}

Uplaod job result response file as defined in /result/{uuid}/{collectionid}

Upload large result response file(s) or sensitive data response file(s). Response file content specification is defined in POST /result/{uuid}/{collectionid}

path Parameters
uuid
required
string
collectionId
required
string
query Parameters
sensitive
required
boolean
chunks
integer <int32>
chunk
integer <int32>
Request Body schema: application/json
file
required
string <binary>

Responses

Request samples

Content type
application/json
{
  • "file": "string"
}

Get job result by collectionid and UUID

path Parameters
uuid
required
string
collectionId
required
string

Responses

Response samples

Content type
application/json
{
  • "collection_id": "string",
  • "message": "string",
  • "protocolVersion": "V2",
  • "queryResult": {
    },
  • "status": "OK",
  • "uuid": "string"
}

Get job step by UUID

path Parameters
uuid
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get job step by UUID and collection id

path Parameters
uuid
required
string
collectionId
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Cancel job result by UUID and collectionId

path Parameters
uuid
required
string
collectionId
required
string

Responses

safe-node-analyzer-controller

Submit new safe node analysis

Request Body schema: application/json
collections
Array of strings
jobID
string <uuid>
keyGenStrLocation
string
keySetID
string <uuid>
step
string
Enum: "KEY_GENERATION_ROUND_1" "KEY_GENERATION_ROUND_2" "DATA_ENCRYPTION" "DATA_DECRYPTION" "KEY_SET_DELETION" "JOB_DELETION" "TASK_DELETION" "ANALYSIS_COMPLETED"
taskId
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "collections": [
    ],
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keyGenStrLocation": "string",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "step": "KEY_GENERATION_ROUND_1",
  • "taskId": "e6e9d88a-9b63-468a-aec3-b7a11de27af8"
}

Submit decryption request

Request Body schema: application/json
collections
Array of strings
dataLocation
string
jobID
string <uuid>
keySetID
string <uuid>
taskID
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "collections": [
    ],
  • "dataLocation": "string",
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "taskID": "e6d742d9-0922-4edc-baeb-3e1ecb0579d1"
}

Delete job and related data

path Parameters
collectionID
required
string
Request Body schema: application/json
jobID
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b"
}

Delete key set and related data

path Parameters
collectionID
required
string
Request Body schema: application/json
jobID
string <uuid>
keySetID
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3"
}

Delete task and related data

path Parameters
collectionID
required
string
Request Body schema: application/json
jobID
string <uuid>
taskID
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "taskID": "e6d742d9-0922-4edc-baeb-3e1ecb0579d1"
}

Submit encryption request

Request Body schema: application/json
object
collections
Array of strings
dataColName
Array of strings
dataLocation
string
dataType
string
jobID
string <uuid>
keySetID
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "classColName": {
    },
  • "collections": [
    ],
  • "dataColName": [
    ],
  • "dataLocation": "string",
  • "dataType": "string",
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3"
}

Generate round 2 key

Request Body schema: application/json
collections
Array of strings
jobID
string <uuid>
keyGenStrLocation
string
keySetID
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "collections": [
    ],
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keyGenStrLocation": "string",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3"
}

safe-node-wrapper-controller

Submit decryption result

Request Body schema: application/json
collectionID
string
dataLocation
string
jobID
string <uuid>
keySetID
string <uuid>
partyID
string
taskID
string <uuid>
valid
boolean

Responses

Request samples

Content type
application/json
{
  • "collectionID": "string",
  • "dataLocation": "string",
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "partyID": "string",
  • "taskID": "e6d742d9-0922-4edc-baeb-3e1ecb0579d1",
  • "valid": true
}

Submit deletion result

Request Body schema: application/json
collectionID
string
jobID
string <uuid>
keySetID
string <uuid>
message
string

Responses

Request samples

Content type
application/json
{
  • "collectionID": "string",
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "message": "string"
}

Submit encryption result

Request Body schema: application/json
collectionID
string
dataLocation
string
encryptID
string <uuid>
jobID
string <uuid>
keySetID
string <uuid>
message
string
valid
boolean

Responses

Request samples

Content type
application/json
{
  • "collectionID": "string",
  • "dataLocation": "string",
  • "encryptID": "615decd1-29a5-4e09-a1b1-d8409136f831",
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "message": "string",
  • "valid": true
}

Submit error response

path Parameters
collectionId
required
string
Request Body schema: application/json
jobId
string <uuid>
message
string
step
string
Enum: "KEY_GENERATION_ROUND_1" "KEY_GENERATION_ROUND_2" "DATA_ENCRYPTION" "DATA_DECRYPTION" "KEY_SET_DELETION" "JOB_DELETION" "TASK_DELETION" "ANALYSIS_COMPLETED"
timestamp
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "jobId": "9d222c6d-893e-4e79-8201-3c9ca16a0f39",
  • "message": "string",
  • "step": "KEY_GENERATION_ROUND_1",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Fetch next safe node analysis job

path Parameters
collectionId
required
string

Responses

Submit key generation round1 result

Request Body schema: application/json
collectionID
string
invalid
boolean
jobID
string <uuid>
keySetID
string <uuid>
keyShareLocation
string
partyID
string

Responses

Request samples

Content type
application/json
{
  • "collectionID": "string",
  • "invalid": true,
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "keyShareLocation": "string",
  • "partyID": "string"
}

Submit key generation round2 result

Request Body schema: application/json
collectionID
string
invalid
boolean
jobID
string <uuid>
keySetID
string <uuid>
keyShareLocation
string
partyID
string

Responses

Request samples

Content type
application/json
{
  • "collectionID": "string",
  • "invalid": true,
  • "jobID": "9d2fedc8-0aa5-417a-9010-924207d2319b",
  • "keySetID": "ba956954-094c-42c2-9cf0-a3b30dfa3dd3",
  • "keyShareLocation": "string",
  • "partyID": "string"
}

statistics-controller

Heartbeat

Request Body schema: application/json
collection
string
dbActive
boolean
object (DiskInfo)
genedActive
boolean
interval
integer <int32>
linkIp
string
object (MemoryInfo)
object (ProcessorInfo)
time
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "collection": "string",
  • "dbActive": true,
  • "diskInfo": {
    },
  • "genedActive": true,
  • "interval": 0,
  • "linkIp": "string",
  • "memoryInfo": {
    },
  • "processorInfo": {
    },
  • "time": "2019-08-24T14:15:22Z"
}

List heartbeat collection list

Responses

List heartbeat history by collection

path Parameters
collectionId
required
string
query Parameters
required
object (Pageable)

Responses

List last 100 requests from all Links

Responses