This SDK tool is still working in progress! Currently there has yet to be
a stable version release, please feel free to open any issue regarding this
SDK
in our community repo
#Requirements
- Node 16+
- npm 7+ | pnpm 6+ | yarn 1+
#Installation
#Usage
import InstillClient from "instill-sdk";
#Configuration
- baseUrl:
string
- local:
http://localhost:8080
- production:
https://api.instill.tech
- appVersion:
string
- apiToken:
string
- local
- username:
admin
- password:
password
// This is the initial password, once they login for the first time, they will need to change it to other password
- production
- go the setting page and create a api token.
https://www.instill.tech/settings
#Connect with Instill Cloud
const client = new InstillClient(
"https://api.instill.tech", // baseUrl
"<your_api_token>" // get console API token from `https://www.instill.tech/settings`
#Connect with Instill Core
const client = new InstillClient(
"http://localhost:8080", // baseUrl
"<your_api_token>" // get console API token from `http://localhost:3000/settings`
#Example Apps
#Connect SDK with Instill Cloud
import { useEffect, useState } from "react";
import InstillClient, { User } from "instill-sdk";
export default function TypescriptSdkDemo() {
const [user, setUser] = useState<User[]>([]);
const client = new InstillClient(
"https://api.instill.tech",
"<your_api_token>" // get console API token from `https://www.instill.tech/settings`
client.Auth.getUserQuery()
console.log("data", data);
console.log("error", error);
<pre style={{ backgroundColor: "white" }}>
{JSON.stringify(user, null, 4)}
#Connect with Instill Core
Make sure you have Instill Core upruning in your local machine.
import { useEffect, useState } from "react";
import InstillClient, { User } from "instill-sdk";
export default function TypescriptSdkDemo() {
const [user, setUser] = useState<User[]>([]);
const client = new InstillClient(
"<your_api_token>" // get console API token from `http://localhost:3000/settings`
client.Auth.getUserQuery()
console.log("data", data);
console.log("error", error);
<pre style={{ backgroundColor: "white" }}>
{JSON.stringify(user, null, 4)}
#Example Templetes
#Next App
#Node App
#API Reference
#Pipelines
Function | Params |
---|
listPipelinesQuery | pageSize, nextPageToken, enablePagination |
listUserPipelinesQuery | pageSize, nextPageToken, userName, enablePagination |
getUserPipelineQuery | pipelineName |
ListUserPipelineReleasesQuery | userName, pipelineName, pageSize, nextPageToken |
getUserPipelineReleaseQuery | pipelineReleaseName |
watchUserPipelineReleaseQuery | pipelineReleaseName |
createUserPipelineMutation | userName, payload |
updateUserPipelineMutation | payload |
deleteUserPipelineMutation | pipelineName |
renameUserPipelineMutation | payload |
createUserPipelineReleaseMutation | pipelineName, payload |
updateUserPipelineReleaseMutation | pipelineReleaseName, payload |
deleteUserPipelineReleaseMutation | pipelineReleaseName |
triggerUserPipelineAction | pipelineName, payload, returnTraces, shareCode |
triggerAsyncUserPipelineAction | pipelineName, payload, returnTraces |
setDefaultUserPipelineReleaseMutation | pipelineReleaseName |
restoreUserPipelineReleaseMutation | pipelineReleaseName |
triggerUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
triggerAsyncUserPipelineReleaseAction | pipelineReleaseName, payload, returnTraces |
#Connector
Function | Params |
---|
listConnectorsQuery | pageSize, nextPageToken, filter |
listUserConnectorsQuery | userName, pageSize, nextPageToken, filter |
listConnectorDefinitionsQuery | connectorDefinitionName |
getConnectorDefinitionQuery | connectorDefinitionName |
getUserConnectorQuery | connectorName |
watchUserConnector | connectorName |
createUserConnectorMutation | entityName, payload |
deleteUserConnectorMutation | connectorName |
updateUserConnectorMutation | payload |
renameUserConnector | payload |
testUserConnectorConnectionAction | connectorName |
connectUserConnectorAction | connectorName |
disconnectUserConnectorAction | connectorName |
#Metric
Function | Params |
---|
listPipelineTriggerRecordsQuery | pageSize, nextPageToken, filter |
listTriggeredPipelineQuery | pageSize, nextPageToken, filter |
listTriggeredPipelineChartQuery | pageSize, nextPageToken, filter |
#Model
Function | Params |
---|
getModelDefinitionQuery | modelDefinitionName |
listModelDefinitionsQuery | pageSize, nextPageToken |
getUserModelQuery | modelName |
listModelsQuery | pageSize, nextPageToken |
listUserModelsQuery | userName, pageSize, nextPageToken |
getUserModelReadmeQuery | modelName |
watchUserModel | modelName |
createUserModelMutation | userName, payload |
updateModelMutation | payload |
deleteUserModelMutation | modelName |
deployUserModelAction | modelName |
undeployUserModeleAction | modelName |
#Operation
Function | Params |
---|
getOperationQuery | operationName |
checkUntilOperationIsDoen | operationName |
#Mgmt
Function | Params |
---|
getUserQuery | userName |
getAuthenticatedUserQuery | |
checkUserIdExist | id |
getApiTokenQuery | tokenName |
listApiTokensQuery | pageSize, nextPageToken |
updateAuthenticatedUserMutation | payload |
createApiTokenMutation | payload |
deleteApiTokenMutation | tokenName |
checkNamespace | id |
#Oraganization
Function | Params |
---|
getOrganizationMembershipQuery | organizationID, userID |
getOrganizationQuery | organizationID |
getUserMembershipQuery | organizationID, userID |
getUserMembershipsQuery | userID |
listOrganizationsQuery | pageSize, nextPageToken, filter |
createOrganizationMutation | payload |
deleteOrganizationMutation | organizationName |
deleteUserMembershipMutation | organizationID,userID |
updateOrganizationMembershipMutation | payload |
updateOrganizationMutation | payload |
updateUserMembershipMutation | payload |
#Generate proto-ts
It will genrate protobuf into dist/protogen-ts
folder