Entity Gem

Get specific Entity Gems of an Entity

get

Get specific Entity Gems of specific entity.

Path parameters
entityIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
get
GET /api/entities/{entityId}/gem-contracts/{entityGemsContractId} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Add Entity Gems of an Entity

post

Add Entity Gems of specific entity.

Path parameters
entityIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
namestringRequired
sourcestringOptional
descstringOptional
logostringOptional
initialDefaultValuestringOptional
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/gem-contracts/ HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "name": "text",
  "source": "text",
  "desc": "text",
  "logo": "text",
  "initialDefaultValue": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Update Entity Gems of an Entity

post

Update Entity Gems Info of specific entity.

Path parameters
entityIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
namestringRequired
sourcestringRequired
descstringRequired
logostringRequired
initialDefaultValuestringRequired
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/gem-contracts/{entityGemsContractId}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 88

{
  "name": "text",
  "source": "text",
  "desc": "text",
  "logo": "text",
  "initialDefaultValue": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Soft Delete Entity Gems of an Entity

post

Soft Delete Entity Gems info of specific entity.

Path parameters
entityIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/gem-contracts/{entityGemsContractId}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "name": "Gem Name",
    "desc": "Gem description",
    "source": "OFFCHAIN",
    "logo": "logo",
    "initialDefaultValue": 100,
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "modifiedAt": "2023-06-27T12:45:00Z"
  }
}

Increase Entity Gems of an user

post

Increase Entity Gems value of a particular user

Path parameters
entityIdstringRequired
userIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
valuestringRequired
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/users/{userId}/gemsContracts/{entityGemsContractId}/increase HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "value": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "userId": "user1",
    "gemsContractId": {
      "entityId": "entity123",
      "name": "Gem Name",
      "desc": "Gem description",
      "source": "OFFCHAIN",
      "logo": "logo",
      "initialDefaultValue": 100,
      "isDeleted": false,
      "createdAt": "2023-06-27T12:45:00Z",
      "modifiedAt": "2023-06-27T12:45:00Z"
    },
    "value": 10
  }
}

Decrease Entity Gems of an user

post

Decrease Entity Gems value of a particular user

Path parameters
entityIdstringRequired
userIdstringRequired
entityGemsContractIdstringRequired
Query parameters
entityIdstringRequired

The Id of the entity.

Example: dummy-entityid
userIdstringRequired

The Id of the user performing the request.

Example: dummy-userid
Header parameters
apikeystringRequired

The API key for authentication

Example: test
tokenstringRequired

The token for user authentication.

Example: dummy-token
Body
valuestringRequired
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/users/{userId}/gemsContracts/{entityGemsContractId}/decrease HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "value": "text"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "userId": "user1",
    "gemsContractId": {
      "entityId": "entity123",
      "name": "Gem Name",
      "desc": "Gem description",
      "source": "OFFCHAIN",
      "logo": "logo",
      "initialDefaultValue": 100,
      "isDeleted": false,
      "createdAt": "2023-06-27T12:45:00Z",
      "modifiedAt": "2023-06-27T12:45:00Z"
    },
    "value": 10
  }
}

Last updated