VIT as a Service Rest API (0.2.2)

Download OpenAPI specification:Download

Voting Implementation Testnet Rest API v0

fund

Information on treasury fund campaigns.

Get available fund

Retrieves information on the current treasury fund campaign.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "fund_name": "string",
  • "fund_goal": "string",
  • "voting_power_info": "string",
  • "voting_power_threshold": 0,
  • "rewards_info": "string",
  • "fund_start_time": "2019-08-24T14:15:22Z",
  • "fund_end_time": "2019-08-24T14:15:22Z",
  • "next_fund_start_time": "2019-08-24T14:15:22Z",
  • "registration_snapshot_time": "2019-08-24T14:15:22Z",
  • "next_registration_snapshot_time": "2019-08-24T14:15:22Z",
  • "chain_vote_plans": [
    ],
  • "groups": [
    ],
  • "challenges": [
    ],
  • "goals": [
    ],
  • "insight_sharing_start": "2019-08-24T14:15:22Z",
  • "proposal_submission_start": "2019-08-24T14:15:22Z",
  • "refine_proposals_start": "2019-08-24T14:15:22Z",
  • "finalize_proposals_start": "2019-08-24T14:15:22Z",
  • "proposal_assessment_start": "2019-08-24T14:15:22Z",
  • "assessment_qa_start": "2019-08-24T14:15:22Z",
  • "snapshot_start": "2019-08-24T14:15:22Z",
  • "voting_start": "2019-08-24T14:15:22Z",
  • "voting_end": "2019-08-24T14:15:22Z",
  • "tallying_end": "2019-08-24T14:15:22Z",
  • "next": {
    }
}

Get fund by id

Retrieves information on the identified treasury fund campaign.

path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "fund_name": "string",
  • "fund_goal": "string",
  • "voting_power_info": "string",
  • "voting_power_threshold": 0,
  • "rewards_info": "string",
  • "fund_start_time": "2019-08-24T14:15:22Z",
  • "fund_end_time": "2019-08-24T14:15:22Z",
  • "next_fund_start_time": "2019-08-24T14:15:22Z",
  • "registration_snapshot_time": "2019-08-24T14:15:22Z",
  • "next_registration_snapshot_time": "2019-08-24T14:15:22Z",
  • "chain_vote_plans": [
    ],
  • "groups": [
    ],
  • "challenges": [
    ],
  • "goals": [
    ],
  • "insight_sharing_start": "2019-08-24T14:15:22Z",
  • "proposal_submission_start": "2019-08-24T14:15:22Z",
  • "refine_proposals_start": "2019-08-24T14:15:22Z",
  • "finalize_proposals_start": "2019-08-24T14:15:22Z",
  • "proposal_assessment_start": "2019-08-24T14:15:22Z",
  • "assessment_qa_start": "2019-08-24T14:15:22Z",
  • "snapshot_start": "2019-08-24T14:15:22Z",
  • "voting_start": "2019-08-24T14:15:22Z",
  • "voting_end": "2019-08-24T14:15:22Z",
  • "tallying_end": "2019-08-24T14:15:22Z"
}

Get list of the fund id

Get list of all the funds in the db.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update or create fund

Update or replace the fund in the db with the one provided.

Responses

challenge

Information on challenges, structuring proposals within a fund.

Get all available challenges

Lists all available challenges following insertion order.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get challenge by id

Retrieves information on the identified challenge, including the proposals submitted for it.

path Parameters
id
required
integer

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "challenge_type": "simple",
  • "title": "string",
  • "description": "string",
  • "rewards_total": 0,
  • "fund_id": 0,
  • "challenge_url": "string",
  • "highlights": {
    },
  • "proposals": [
    ]
}

proposal

Information on funding proposals.

Get proposals by chain id

Retrieves queried proposals.

Request Body schema: application/json

List of voteplan id and indexes query

Array ()
voteplan_id
string
indexes
Array of integers <i64>

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
Example
{
  • "internal_id": 22,
  • "proposal_id": "4af0e6b3452cd4ee822b2ec1859fd57b5512f85c14875f408081aa9b796dfc6e",
  • "proposal_title": "Authentication for DeepFake Defense",
  • "proposal_summary": "Deepfake videos are dangerous.",
  • "proposal_solution": "We will create a cryptographic proof on Cardano that verifies videos are real by connecting their blockchain ID.",
  • "proposal_public_key": "Fvd8zI3DH85qnaChQE6Aymt1diMJP32LB0AdpheZh/Q=",
  • "proposal_funds": 12000,
  • "proposal_files_url": "",
  • "proposal_impact_score": 0,
  • "proposer": {
    },
  • "chain_proposal_id": "4af0e6b3452cd4ee822b2ec1859fd57b5512f85c14875f408081aa9b796dfc6e",
  • "chain_vote_options": {
    },
  • "chain_vote_start_time": "2021-02-10T14:40:27+00:00",
  • "chain_vote_end_time": "2021-02-11T10:10:27+00:00",
  • "chain_committee_end_time": "2021-02-11T11:40:27+00:00",
  • "chain_voteplan_payload": "public",
  • "chain_vote_encryption_key": "",
  • "fund_id": 20,
  • "challenge_id": 2,
  • "challenge_type": "simple"
}

Get all available proposals

Lists all available proposals.

path Parameters
voter_group_id
required
string

Get proposals only for the specified vote group.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get proposal by id filtered by group

Retrieves information on the identified proposal if it belongs to the provided group.

path Parameters
id
required
integer
voter_group_id
required
string

Responses

Response samples

Content type
application/json
Example
{
  • "internal_id": 22,
  • "proposal_id": "4af0e6b3452cd4ee822b2ec1859fd57b5512f85c14875f408081aa9b796dfc6e",
  • "proposal_title": "Authentication for DeepFake Defense",
  • "proposal_summary": "Deepfake videos are dangerous.",
  • "proposal_solution": "We will create a cryptographic proof on Cardano that verifies videos are real by connecting their blockchain ID.",
  • "proposal_public_key": "Fvd8zI3DH85qnaChQE6Aymt1diMJP32LB0AdpheZh/Q=",
  • "proposal_funds": 12000,
  • "proposal_files_url": "",
  • "proposal_impact_score": 0,
  • "proposer": {
    },
  • "chain_proposal_id": "4af0e6b3452cd4ee822b2ec1859fd57b5512f85c14875f408081aa9b796dfc6e",
  • "chain_vote_options": {
    },
  • "chain_vote_start_time": "2021-02-10T14:40:27+00:00",
  • "chain_vote_end_time": "2021-02-11T10:10:27+00:00",
  • "chain_committee_end_time": "2021-02-11T11:40:27+00:00",
  • "chain_voteplan_payload": "public",
  • "chain_vote_encryption_key": "",
  • "fund_id": 20,
  • "challenge_id": 2,
  • "challenge_type": "simple"
}

Get voted by chain id

Retrieves queried proposals.

Request Body schema: application/json

List of votes by voteplan id and caster (wallet)

vote_plan_id
string <hash>

Blockchain ID of the vote plan transaction.

caster
string <hash>

public key of caster wallet

Responses

Request samples

Content type
application/json
{
  • "vote_plan_id": "string",
  • "caster": "string"
}

Response samples

Content type
application/json
{
  • "fragment_id": "string",
  • "caster": "string",
  • "proposal": 0,
  • "voteplan_id": "string",
  • "time": 0,
  • "choice": "string",
  • "raw_fragment": "string"
}

reviews

Information on reviews.

Get reviews related to a proposal

Retrieves advisor reviews information for the provided proposal id.

path Parameters
proposal_id
required
integer

Responses

Response samples

Content type
application/json
[
  • {
    }
]

snapshot

Continuous snapshot related information.

Get voter's info by voting key

Get voter's info by voting key

path Parameters
tag
required
string
voting_key
required
string

Responses

Response samples

Content type
application/json
{
  • "voter_info": [
    ],
  • "last_updated": "2019-08-24T14:15:22Z"
}

Get delegator's info by stake public key

Get delegator's info by stake public key

path Parameters
tag
required
string
stake_public_key
required
string

Responses

Response samples

Content type
application/json
{
  • "voter_info": [
    ],
  • "last_updated": "2019-08-24T14:15:22Z"
}

Get list of available versions

Get list of available snapshot versions, which can be used to retrieve voting power

Responses

Replace the snapshot data for the given tag

Replace the snapshot data for the given tag

path Parameters
tag
required
string
Request Body schema: application/json
snapshot
array

list of SnapshotInfo entries in json format

update_timestamp
string <date-time>

Date and time for the latest update to this snapshot information.

Responses

Request samples

Content type
application/json
{
  • "snapshot": [ ],
  • "update_timestamp": "2019-08-24T14:15:22Z"
}

Replace the snapshot data for the given tag

Replace the snapshot data for the given tag

path Parameters
tag
required
string
Request Body schema: application/json
snapshot
object

RawSnapshot in json format

min_stake_threshold
integer

Registrations voting power threshold for eligibility

voting_power_cap
string

Voting power cap for each account

direct_voters_group
string

Voter group to assign direct voters to. If empty, defaults to "voter"

representatives_group
string

Voter group to assign representatives to. If empty, defaults to "rep"

update_timestamp
string <date-time>

Date and time for the latest update to this snapshot information.

Responses

Request samples

Content type
application/json
{
  • "snapshot": { },
  • "min_stake_threshold": 0,
  • "voting_power_cap": "string",
  • "direct_voters_group": "string",
  • "representatives_group": "string",
  • "update_timestamp": "2019-08-24T14:15:22Z"
}

vote

Historic votes related information.

search

Search challenges and proposals information.

Search various resources with various constraints

Search various resources especially challenges and proposals with various constraints like contains some string etc.

Request Body schema: application/json
required
object (SearchConstraint)
Array of objects (SearchConstraint)
Array of objects (SearchOrderBy)
limit
integer <i32>

Sets the limit clause of the search query.

offset
integer <i32>

Sets the offset clause of the search query.

Responses

Request samples

Content type
application/json
{
  • "table": {
    },
  • "filter": [
    ],
  • "order-by": [
    ],
  • "limit": 0,
  • "offset": 0
}

Response samples

Content type
application/json
Example
[ ]

Returns count of the result set of search operation

Search various resources with various constraints and returns count of the result set

Request Body schema: application/json
required
object (SearchConstraint)
Array of objects (SearchConstraint)
Array of objects (SearchOrderBy)

Responses

Request samples

Content type
application/json
{
  • "table": {
    },
  • "filter": [
    ],
  • "order-by": [
    ]
}

Response samples

Content type
application/json
0