Class PingResponse

java.lang.Object
ai.vectros.types.PingResponse

public final class PingResponse extends Object
  • Method Details

    • getStatus

      public String getStatus()
      Returns:
      Always "ok" on a successful (2xx) response. Failures are returned as a non-2xx status, so this value is never anything but "ok".
    • getTenantId

      public String getTenantId()
      Returns:
      Identifier of the account this credential authenticates under.
    • getEnvironment

      public PingResponseEnvironment getEnvironment()
      Returns:
      The environment that served this response.
    • getPrincipalType

      public PingResponsePrincipalType getPrincipalType()
      Returns:
      The kind of credential you authenticated with: root_key = an unscoped sk_* API key; scoped_key = an ssk_* API key with a bound access profile; token = a short-lived st_* token (its expiry is in tokenExpiresAt).
    • getPrincipalKeyId

      public String getPrincipalKeyId()
      Returns:
      Stable identifier for your credential. For sk_* and ssk_* keys this is the key id; for st_* tokens it is the token's JWT id (jti), which is unique per mint — two tokens minted for the same user report different values.
    • getPrincipalLabel

      public Optional<String> getPrincipalLabel()
      Returns:
      The label you set on the originating sk_* or ssk_* key. Omitted when no label is set, or when the credential is an st_* token.
    • getAllowedActions

      public Optional<List<String>> getAllowedActions()
      Returns:
      The actions this credential is allowed to perform. Present only when principalType is scoped_key.
    • getDataScope

      public Optional<DataScope> getDataScope()
    • getTokenExpiresAt

      public Optional<Long> getTokenExpiresAt()
      Returns:
      When the token expires, as seconds since the Unix epoch (mirrors the JWT exp claim). Present only when principalType is token.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static PingResponse.StatusStage builder()