Entity Data contract

Terminate Feature Flag For Entity

get

Terminate Feature Flag For Entity

Path parameters
entityIdstringRequired
flagNamestringRequired
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}/featureFlags/{flagName}/terminate HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "flagName": "Flag Name",
    "description": "Flag description",
    "isActive": true,
    "isEnabled": true,
    "createdAt": "2023-06-27T12:45:00Z",
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    }
  }
}

Get entity level flags of an Entity

post

Get entity level flags of a particular Entity

Path parameters
entityIdstringRequired
forEntityIdstringRequired
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}/forEntityId/{forEntityId}/featureFlags HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "flags": {
    "entityId": "entity123",
    "flagName": "Flag Name",
    "description": "Flag description",
    "isActive": true,
    "isEnabled": true,
    "createdAt": "2023-06-27T12:45:00Z",
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    }
  }
}

Get All Data Contracts for an Entity

get

Get all Data Contracts for 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
Responses
200
Successful response
application/json
get
GET /api/entities/{entityId}/dataContracts HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "createdBy": "user123",
    "name": "Data Contract Name",
    "description": "Data Contract Description",
    "tags": [
      [
        "tag1",
        "tag2"
      ]
    ],
    "source": "URL",
    "fields": [
      {
        "name": "FieldName",
        "description": "Field Description",
        "validationRules": {
          "type": "string",
          "required": false,
          "unique": false,
          "nonnull": false,
          "minLength": 0,
          "maxLength": 255,
          "enum": [
            "value1",
            "value2"
          ],
          "regex": "^\\d{3}-\\d{2}-\\d{4}$",
          "min": 0,
          "max": 100
        }
      }
    ],
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "updatedAt": "2023-06-27T12:45:00Z"
  }
}

Add new data contract

post

Add new data contract info 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
namestringOptionalExample: Data Contract Name
descriptionstringOptionalExample: Data Contract Description
sourcestringOptionalExample: URL
tagsstring[]OptionalExample: ["tag1","tag2"]
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/dataContracts HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 371

{
  "name": "Data Contract Name",
  "description": "Data Contract Description",
  "source": "URL",
  "fields": [
    {
      "name": "FieldName",
      "description": "Field Description",
      "validationRules": {
        "type": "string",
        "required": false,
        "unique": false,
        "nonnull": false,
        "minLength": 0,
        "maxLength": 255,
        "enum": [
          [
            "value1",
            "value2"
          ]
        ],
        "regex": "^\\d{3}-\\d{2}-\\d{4}$",
        "min": 0,
        "max": 100
      }
    }
  ],
  "tags": [
    [
      "tag1",
      "tag2"
    ]
  ]
}
{
  "success": true,
  "datasetId": "id-123"
}

Get specific data contract

get

Get specific data contract of an entity.

Path parameters
entityIdstringRequired
dataContractIdstringRequired
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}/dataContracts/{dataContractId} HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "createdBy": "user123",
    "name": "Data Contract Name",
    "description": "Data Contract Description",
    "tags": [
      [
        "tag1",
        "tag2"
      ]
    ],
    "source": "URL",
    "fields": [
      {
        "name": "FieldName",
        "description": "Field Description",
        "validationRules": {
          "type": "string",
          "required": false,
          "unique": false,
          "nonnull": false,
          "minLength": 0,
          "maxLength": 255,
          "enum": [
            "value1",
            "value2"
          ],
          "regex": "^\\d{3}-\\d{2}-\\d{4}$",
          "min": 0,
          "max": 100
        }
      }
    ],
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "updatedAt": "2023-06-27T12:45:00Z"
  }
}

Update data contract

post

Update data contract of specific entity.

Path parameters
entityIdstringRequired
dataContractIdstringRequired
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
namestringOptionalExample: Data Contract Name
descriptionstringOptionalExample: Data Contract Description
sourcestringOptionalExample: URL
tagsstring[]OptionalExample: ["tag1","tag2"]
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/dataContracts/{dataContractId}/update HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 371

{
  "name": "Data Contract Name",
  "description": "Data Contract Description",
  "source": "URL",
  "fields": [
    {
      "name": "FieldName",
      "description": "Field Description",
      "validationRules": {
        "type": "string",
        "required": false,
        "unique": false,
        "nonnull": false,
        "minLength": 0,
        "maxLength": 255,
        "enum": [
          [
            "value1",
            "value2"
          ]
        ],
        "regex": "^\\d{3}-\\d{2}-\\d{4}$",
        "min": 0,
        "max": 100
      }
    }
  ],
  "tags": [
    [
      "tag1",
      "tag2"
    ]
  ]
}
{
  "success": true
}

Delete data contracts

post

Delete data contracts of specific entity.

Path parameters
entityIdstringRequired
dataContractIdstringRequired
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}/dataContracts/{dataContractId}/delete HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Accept: */*
{
  "success": true
}

Chat with Data Contract for Entity

post

Chat with the specified Data Contract for a specific entity.

Path parameters
entityIdstringRequired
dataContractIdstringRequired
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
userInputstringOptional

User input for the chat conversation.

isInternalbooleanOptional

Flag indicating whether the request is internal (true/false).

Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/dataContracts/{dataContractId}/chat HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "userInput": "text",
  "isInternal": true
}
{
  "success": true,
  "data": "Generated chat response",
  "queryCount": 42
}

Upload CSV and Create Data Contract

post

Upload a CSV file to create a new data contract for a 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
uploaded_filestring · binaryOptional
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/uploadcsv HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: multipart/form-data
Accept: */*
Content-Length: 26

{
  "uploaded_file": "binary"
}
{
  "success": true,
  "data": {
    "entityId": "entity123",
    "createdBy": "user123",
    "name": "Data Contract Name",
    "description": "Data Contract Description",
    "tags": [
      [
        "tag1",
        "tag2"
      ]
    ],
    "source": "URL",
    "fields": [
      {
        "name": "FieldName",
        "description": "Field Description",
        "validationRules": {
          "type": "string",
          "required": false,
          "unique": false,
          "nonnull": false,
          "minLength": 0,
          "maxLength": 255,
          "enum": [
            "value1",
            "value2"
          ],
          "regex": "^\\d{3}-\\d{2}-\\d{4}$",
          "min": 0,
          "max": 100
        }
      }
    ],
    "isDeleted": false,
    "createdAt": "2023-06-27T12:45:00Z",
    "updatedAt": "2023-06-27T12:45:00Z"
  }
}

Fetch schema fields from Google Sheet

post

Fetch only the fields in schema from Google Sheets & add new data contract

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
googleSheetLinkstringOptionalExample: https://docs.google.com/spreadsheets/d/18L1234555555/
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/googlesheet HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "googleSheetLink": "https://docs.google.com/spreadsheets/d/18L1234555555/"
}
{
  "success": true,
  "datasetId": "u-123"
}

Auto Generate the description

post

Auto Generate the description using AI

Path parameters
entityIdstringRequired
dataContractIdstringRequired
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
Responses
200
Successful response
application/json
post
POST /api/entities/{entityId}/dataContracts/{dataContractId}/autoGenerate HTTP/1.1
Host: api.questprotocol.xyz
apikey: test
token: dummy-token
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "fields": [
    {
      "name": "FieldName",
      "description": "Field Description",
      "validationRules": {
        "type": "string",
        "required": false,
        "unique": false,
        "nonnull": false,
        "minLength": 0,
        "maxLength": 255,
        "enum": [
          [
            "value1",
            "value2"
          ]
        ],
        "regex": "^\\d{3}-\\d{2}-\\d{4}$",
        "min": 0,
        "max": 100
      }
    }
  ]
}
{
  "success": true,
  "res": "Generated description message"
}

Last updated