Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.15 KB

File metadata and controls

56 lines (43 loc) · 1.15 KB

ApiKeyDetails

Properties

Name Type
id number
name string
prefix string
scopes Array<string>
ipAllowlist string
rateLimitRpm number
expiresAt Date
lastUsedAt Date
lastUsedIp string
callCount number
revokedAt Date
createdAt Date

Example

import type { ApiKeyDetails } from 'goadserver-sdk'

// TODO: Update the object below with actual values
const example = {
  "id": null,
  "name": null,
  "prefix": gas_live_abc1,
  "scopes": null,
  "ipAllowlist": null,
  "rateLimitRpm": null,
  "expiresAt": null,
  "lastUsedAt": null,
  "lastUsedIp": null,
  "callCount": null,
  "revokedAt": null,
  "createdAt": null,
} satisfies ApiKeyDetails

console.log(example)

// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)

// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as ApiKeyDetails
console.log(exampleParsed)

[Back to top] [Back to API list] [Back to Model list] [Back to README]