Skip to content
nikcli
Docs
Documentation

Connectors

Connector status, per-connector credentials, and cache invalidation.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected
How this works

Start a server with nikcli serve --hostname 127.0.0.1 --port 4096. Requests go straight from this page to that address — the browser allows it because loopback counts as a secure origin, and the server allows it because nikcli-ai.dev is in its CORS allowlist.

To try things without touching your real sessions or config, start the server with NIKCLI_TEST_HOME pointed at a throwaway directory — see the guided tour.

Operations

4 endpoints, generated from the server's own OpenAPI document. Every path also accepts the directory and workspace query parameters that select which instance handles the request.

get /connectors connectors.status
post /connectors/{name}/auth connectors.auth.set
delete /connectors/{name}/auth connectors.auth.remove
post /connectors/invalidate connectors.invalidate
get /connectors # connectors.status
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Responses
200 ConnectorsStatusOutput application/json
{
  [key: string]: ConnectorStatus
}
Example response from schema
{}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
connectors.status
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.connectors.status({
  ...
})
Try it
post /connectors/{name}/auth # connectors.auth.set
Parameters
Name In Type Required
name path string required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  token?: string
  botToken?: string
  apiKey?: string
  teamId?: string
  expiresAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  refreshToken?: string
  refreshTokenExpiresAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
Responses
200 ConnectorsSuccess application/json
{
  success: true
}
400 ConnectorsValidationError application/json
{
  name: "ValidationError"
  data: { [key: string]: unknown }
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
connectors.auth.set
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.connectors.auth.set({
  ...
})
Try it
delete /connectors/{name}/auth # connectors.auth.remove
Parameters
Name In Type Required
name path string required
directory query string optional
workspace query string optional
Responses
200 ConnectorsSuccess application/json
{
  success: true
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
connectors.auth.remove
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.connectors.auth.remove({
  ...
})
Try it

This changes or removes server state, against whatever base URL is set above.

post /connectors/invalidate # connectors.invalidate
Parameters
Name In Type Required
directory query string optional
workspace query string optional
Request body · required · application/json
{
  name?: string
}
Responses
200 ConnectorsSuccess application/json
{
  success: true
}
Example response from schema
{
  "success": true
}

Generated from the response schema — field values are placeholders, the shape is real.

SDK example
connectors.invalidate
ts
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.connectors.invalidate({
  ...
})
Try it

Schemas

The 6 schemas reachable from these endpoints. Each is shown one level deep; nested types link to their own entry below. Names ending in _2, _3 and so on are the OpenAPI emitter disambiguating same-named schemas declared by different HttpApi groups — they are distinct shapes, not duplicates.

ConnectorsAuthInput
{
  token?: string
  botToken?: string
  apiKey?: string
  teamId?: string
  expiresAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
  refreshToken?: string
  refreshTokenExpiresAt?: 
    | number
    | "Infinity" | "-Infinity" | "NaN"
}
ConnectorsInvalidateInput
{
  name?: string
}
ConnectorsStatusOutput
{
  [key: string]: ConnectorStatus
}
ConnectorsSuccess
{
  success: true
}
ConnectorStatus
  | {
  status: "connected"
}
  | {
  status: "disabled"
}
  | {
  status: "failed"
  error: string
}
  | {
  status: "needs_auth"
}
ConnectorsValidationError
{
  name: "ValidationError"
  data: { [key: string]: unknown }
}