get__organization_{orgId}_key

GET /organization/{idOrg}/key

List Organization Keys

Retrieve all organization keys with their associated node information for the specified organization.

This endpoint returns a list of all RSA public keys generated for the organization, along with metadata about which nodes are associated with each key. This is useful for monitoring key usage and managing node associations.

Key Features:

  • Lists all organization keys with creation timestamps

  • Shows associated node information for each key

  • Ordered by creation date (newest first)

  • Includes key IDs and organization associations

Access Control:

  • Requires ADMINISTRATOR or OWNER role within the organization

  • Users can only view keys for their own organization

  • No sensitive private key information is returned

Security:

  • Only public keys are returned in the response

  • Private keys are never exposed through this endpoint

  • All operations are logged for security auditing

TypeScript Client Library

public getOrgKeys = async (idOrg: string): Promise<GetOrganizationKeysResponse> => {
  return this.makeRequest<GetOrganizationKeysResponse>(`organization/${idOrg}/key`, 'GET');
};

Code Samples

# You can also use wget
curl -X GET https://backend.flashback.tech/organization/{idOrg}/key \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Parameters

Name
In
Type
Required
Description

idOrg

path

string

true

Organization ID for which to retrieve keys

Example responses

200 Response

{
  "success": true,
  "data": [
    {
      "id": "key-123e4567-e89b-12d3-a456-426614174000",
      "orgId": "org-123e4567-e89b-12d3-a456-426614174000",
      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7VJTUt9Us8cKBwT1L6O5VfwlrP0xP2B5iZvr5Xq5BwL1K2Y3...\n-----END PUBLIC KEY-----",
      "createdAt": "2024-01-15T10:30:00.000Z",
      "nodeKeys": [
        {
          "keyId": "key-123e4567-e89b-12d3-a456-426614174000",
          "nodeId": "192.168.1.100"
        },
        {
          "keyId": "key-123e4567-e89b-12d3-a456-426614174000",
          "nodeId": "192.168.1.101"
        }
      ]
    },
    {
      "id": "key-987fcdeb-51a2-43d7-8f9e-123456789abc",
      "orgId": "org-123e4567-e89b-12d3-a456-426614174000",
      "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9XKSUv0Vt9dLcxwT2M7P6Wgxmr1yQ3C6iZws6Yq6CxM2L3Z4...\n-----END PUBLIC KEY-----",
      "createdAt": "2024-01-14T15:45:00.000Z",
      "nodeKeys": []
    }
  ]
}

403 Response

{
  "success": false,
  "message": "Access denied: you can only view keys for your own organization"
}

Responses

Status
Meaning
Description
Schema

200

List of organization keys

Inline

403

Insufficient permissions or access denied

Inline

500

Failed to retrieve keys

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Operation success status

» data

[object]

false

none

Array of organization keys

»» id

string

false

none

Unique identifier for the key

»» orgId

string

false

none

Organization ID that owns the key

»» publicKey

string

false

none

RSA public key in PEM format

»» createdAt

string(date-time)

false

none

Key creation timestamp

»» nodeKeys

[object]

false

none

Array of associated node information

»»» keyId

string

false

none

Key ID reference

»»» nodeId

string

false

none

Node IP address or identifier

Status Code 403

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Operation success status

» message

string

false

none

Error message describing the permission issue

Status Code 500

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

Operation success status

» message

string

false

none

Error message describing the internal error

To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth

Last updated

Was this helpful?