Updated on 2023-01-16 GMT+08:00

Querying All Processes of a Process Creator

Function

This API is used to query all processes of a process creator.

URI

POST /v1/datashare/dataset/query-processes

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

orgID

Yes

String

Organization ID.

channelID

Yes

String

Channel ID.

cryptoMethod

Yes

String

Encryption method, which is fixed at SW.

cert

Yes

String

Certificate.

sk

Yes

String

Private key.

timestamp

Yes

String

Timestamp.

currentPage

No

String

Pagination parameter: page number (default value: 1).

pageSizeNum

No

String

Pagination parameter: number of records on each page (default value: 100).

creatorDID

Yes

String

Process creator identifier.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

items

Array of DatasetShareProcessResponseBody objects

List of data set sharing processes.

pagination

PaginationResp object

Pagination information.

Table 3 DatasetShareProcessResponseBody

Parameter

Type

Description

creatorDID

String

Process creator identifier.

processID

String

Process ID.

stages

Array of StageInProcess objects

Information about a stage in the process.

Table 4 StageInProcess

Parameter

Type

Description

stageName

String

Stage name.

createTime

String

Timestamp when the stage information is stored to the blockchain.

consumer

String

Consumer identifier.

orderSeq

String

Order number.

Table 5 PaginationResp

Parameter

Type

Description

currentPage

Integer

Current page.

pageSizeNum

Integer

Number of records on each page.

totalItems

Integer

Total number of records.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

errorCode

String

Error code.

errorMsg

String

Error description.

Example Requests

/v1/datashare/dataset/query-processes

{
  "orgID" : "{{orgID}}",
  "channelID" : "{{channelID}}",
  "cryptoMethod" : "{{cryptoMethod}}",
  "cert" : "{{cert}}",
  "sk" : "{{sk}}",
  "timestamp" : "{{timestamp}}",
  "creatorDID" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
  "currentPage" : "1",
  "pageSizeNum" : "100"
}

Example Responses

Status code: 200

Parameters in the response to the request for querying all processes of a process creator.

{
  "items" : [ {
    "creatorDID" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
    "processID" : "442a6b42-82b7-415a-a0e6-deaaee59f582",
    "stages" : [ {
      "stageName" : "Seconde transaction",
      "createTime" : "1639824526",
      "consumer" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
      "orderSeq" : "N6UhspZ5cQY7NtHsxuFTZ"
    } ]
  }, {
    "creatorDID" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
    "processID" : "a779dd88-f7a3-4ac9-bf1c-a0ed1d827632",
    "stages" : [ {
      "stageName" : "First transaction",
      "createTime" : "1639824239",
      "consumer" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
      "orderSeq" : "FKCx1Cfatj7RRsKMWPQ7wQ"
    }, {
      "stageName" : "",
      "createTime" : "1639826471",
      "consumer" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
      "orderSeq" : "8PuuWWg521bZDXadzwPdMn"
    }, {
      "stageName" : "Seconde transaction",
      "createTime" : "1639826898",
      "consumer" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
      "orderSeq" : "SCkh1rQ6aD5SYTYkojn44W"
    } ]
  }, {
    "creatorDID" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
    "processID" : "d15b5213-5cb8-4af4-97dc-143379369f35",
    "stages" : [ {
      "stageName" : "564econde transaction",
      "createTime" : "1639827681",
      "consumer" : "did:example:8sAvsS4tB3NYgMJ4uqbVYj",
      "orderSeq" : "XCXtVZsdKFDLaErzpSZYAN"
    } ]
  } ],
  "pagination" : {
    "currentPage" : 1,
    "pageSizeNum" : 100,
    "totalItems" : 3
  }
}

Status Codes

Status Code

Description

200

Parameters in the response to the request for querying all processes of a process creator.

500

Error response.

Error Codes

See Error Codes.