Keys API

📋 Table of Contents

Overview

The Keys API provides comprehensive cryptographic key management services for the OASIS ecosystem. It handles key generation, storage, rotation, and security with support for multiple key types, encryption algorithms, and advanced security features.

Key Management

Get All Keys

GET /api/keys
Authorization: Bearer YOUR_TOKEN

Query Parameters:

  • limit (int, optional): Number of results (default: 50)

  • offset (int, optional): Number to skip (default: 0)

  • type (string, optional): Filter by key type (RSA, AES, ECDSA, Ed25519)

  • status (string, optional): Filter by status (Active, Inactive, Expired, Revoked)

  • owner (string, optional): Filter by owner ID

  • sortBy (string, optional): Sort field (name, createdAt, expiresAt)

  • sortOrder (string, optional): Sort order (asc/desc, default: desc)

Response:

Get Key by ID

Parameters:

  • keyId (string): Key UUID

Response:

Create Key

Request Body:

Response:

Update Key

Parameters:

  • keyId (string): Key UUID

Request Body:

Delete Key

Parameters:

  • keyId (string): Key UUID

Key Operations

Encrypt Data

Parameters:

  • keyId (string): Key UUID

Request Body:

Response:

Decrypt Data

Parameters:

  • keyId (string): Key UUID

Request Body:

Response:

Sign Data

Parameters:

  • keyId (string): Key UUID

Request Body:

Response:

Verify Signature

Parameters:

  • keyId (string): Key UUID

Request Body:

Response:

Generate Key Pair

Request Body:

Response:

Key Security

Rotate Key

Parameters:

  • keyId (string): Key UUID

Response:

Revoke Key

Parameters:

  • keyId (string): Key UUID

Response:

Get Key Security

Parameters:

  • keyId (string): Key UUID

Response:

Update Key Security

Parameters:

  • keyId (string): Key UUID

Request Body:

Key Analytics

Get Key Statistics

Query Parameters:

  • timeframe (string, optional): Timeframe (hour, day, week, month)

  • type (string, optional): Filter by key type

Response:

Get Key Performance

Response:

Get Key Health

Response:

Error Responses

Key Not Found

Invalid Key Type

Key Expired

Key Revoked

Encryption Error


← Previous: Files API | Next: Competition API

Last updated