Catalyst / admin/Synapse-Cortex 14.8 GB / 57.8 GB 40.0 GB free
Help Sign in

admin / Synapse-Cortex

public

Self Hosted ITSM Tool with RBAC/Tenanting and MFA

Code Issues Pull requests Pipelines Packages Security Insights Wiki Settings
Synapse-Cortex / Synapse-Cortexv2 / frontend / src / api / credentials.ts 546 B · main
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import { api } from './client'
import type { CredentialOut } from './types'

export interface CredentialCreatePayload {
  label: string
  username: string
  // Optional when asset_id is set - the backend derives host from the
  // asset's own recorded IP address instead.
  host?: string
  port?: number
  secret: string
  asset_id?: string
}

export const credentialsApi = {
  list: () => api.get<CredentialOut[]>('/api/v1/credentials'),
  create: (payload: CredentialCreatePayload) => api.post<CredentialOut>('/api/v1/credentials', payload),
}