OX Guard API (2.8.0)

Download OpenAPI specification:Download

Documentation of the Open-Xchange OX Guard HTTP API


login

The login module is used to obtain a Guard authentication token which can be used to decrypt encrypted data without providing the user's password.

login

Performs a login against the OX Guard Server in order to obtain an authentication token and various user specific settings.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded

The new password which will be set to protect the private key.

encr_password
string

The plain text password of the user's OX Guard key, or null if just fetching user settings.

language
string
Default: "en_EN"

The language code of the client (for example "de_DE"), or null for the default value (en_EN).

Responses

Response samples

Content type
application/json
{
  • "server": "string",
  • "cid": 0,
  • "primaryEmail": "string",
  • "pubKey": "string",
  • "auth": "string",
  • "recoveryAvail": true,
  • "lang": {
    },
  • "settings": {
    }
}

changepass

Changes the password of the user's current key

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded

Data containing necessary information in order to change the user's password.

oldpass
string

The current password of the key which will be replaced.

newpass
string

The new password to set.

Responses

Response samples

Content type
application/json
{
  • "auth": "string"
}

secondary

Gets the user's secondary email address where password reset information will be sent to.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Responses

Response samples

Content type
application/json
"string"

changesecondary

Sets the user's secondary email address where password reset information will be sent to.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded

Data containing necessary information in order to change the user's password.

password
string

The password of the user's current OX Guard key.

email
string

The new secondary email address to set.

Responses

Response samples

Content type
application/json
"string"

reset

Resets the password of the user's current key to a new random password which will be sent to the user's secondary email address, or primary address if no secondary email address is available.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Responses

Response samples

Content type
application/json
"string"

keys

The keys module provides functionality to create, receive and manage PGP key pairs.

hasKey

Checks if the user has at least one public and/or private PGP key available.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "error_params": [
    ],
  • "error_id": "string",
  • "error_desc": "string",
  • "error_stack": [
    ],
  • "code": "string",
  • "categories": "string",
  • "category": 0
}

create

Creates a new PGP key ring for the user and marks the new key ring as "current".

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded
password
required
string

The new password which will be set to protect the private key.

name
required
string

The user's name which will be part of the key identity.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "error_params": [
    ],
  • "error_id": "string",
  • "error_desc": "string",
  • "error_stack": [
    ],
  • "code": "string",
  • "categories": "string",
  • "category": 0
}

delete

Deletes a specific PGP key ring

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

keyid
required
string

The master key ID of the key ring which should be deleted.

Request Body schema: application/x-www-form-urlencoded
password
required
string

The password of the private key.

Responses

getKeys

Gets the the user's collection of public PGP key rings.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "error_params": [
    ],
  • "error_id": "string",
  • "error_desc": "string",
  • "error_stack": [
    ],
  • "code": "string",
  • "categories": "string",
  • "category": 0
}

getKey

Gets a specific PGP key ring owned by the user containing public and/or private PGP keys. This request fetches detailed information about a specific PGP key ring.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

keyid
integer <int64>

Specifies the ID of the key to fetch. If this parameter is missing the key marked as "current" is returned instead.

keyType
string
Default: "public_private"
Enum: "public" "private" "public_private"

Specifies if the public and/or the private key of the key ring should be fetched.

Request Body schema: application/x-www-form-urlencoded
password
string

The password of the private key (if keyType is set to 'private' or 'public_private')

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "error_params": [
    ],
  • "error_id": "string",
  • "error_desc": "string",
  • "error_stack": [
    ],
  • "code": "string",
  • "categories": "string",
  • "category": 0
}

downloadKey

Downloads the ASCII armored representation of a specific PGP key ring owned by the user containing public and/or private PGP keys. This request fetches the raw ASCII armored PGP key ring data.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

keyid
integer <int64>

Specifies the ID of the key to fetch. If this parameter is omitted the key marked as "current" is returned instead.

keyType
string
Default: "public_private"
Enum: "public" "private" "public_private"

Specifies if the public and/or the private key of the key ring should be fetched.

Request Body schema: application/x-www-form-urlencoded
password
string

The password of the private key (if keyType is set to 'private' or 'public_private')

Responses

setCurrentKey

Marks a Guard PGP key ring as "current".

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

keyid
required
integer <int64>

The master key ID of the key ring which should be marked as "current".

Responses

upload

Uploads a new ASCII armored key ring to OX Guard. The key ring can contain public and/or private keys.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded
key
required
string

The ASCII armored data of the key ring.

keyPassword
string

The password of the private key. Can be omitted if the uploaded key ring does only contain public keys.

newPassword
string

The new password to set for the imported private keys. Can be omitted if the uploaded key ring does only contain public keys.

Responses

uploadExternalPublicKey

A user can upload public keys for other external communication partners. This requests uploads an ASCII armored public key of an external recipient for later user.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded
key
required
string

The ASCII armored data of the key ring.

Responses

getExternalPublicKeys

Gets a list of upload public keys for external recipients. A user can upload public key rings for other external communication partners. This requests gets the uploaded public key rings for externals including useful meta information.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "error": "string",
  • "error_params": [
    ],
  • "error_id": "string",
  • "error_desc": "string",
  • "error_stack": [
    ],
  • "code": "string",
  • "categories": "string",
  • "category": 0
}

shareExternalPublicKey

Marks an uploaded external recipient key as shared or as not shared. An external public key which is marked as shared can be accessed from other OX Guard users in the same context.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

ids
required
string

The ids parameter from the ExternalPublicKeyRing object as obtained from the GetExternalPublicKeys request.

shared
required
boolean

True, to mark the key ring as "shared", False to mark it as "not shared".

Responses

InlineExternalPublicKey

Marks an uploaded external recipient key as "inline". An external public key which is marked as "inline" produces PGP/INLNE email encryption by default.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

ids
required
string

The ids parameter from the ExternalPublicKeyRing object as obtained from the GetExternalPublicKeys request.

inline
required
boolean

True, to mark the key ring as "inline", False to mark it as "not inline".

Responses

DeleteExternalPublicKey

Deletes an uploaded external recipient key.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

ids
required
string

The ids parameter from the ExternalPublicKeyRing object as obtained from the GetExternalPublicKeys request.

Responses

addUserId

Adds a new user ID "name " to the given key ring.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

Request Body schema: application/x-www-form-urlencoded
keyid
required
integer <int64>

The master key ID of the key ring which should be changed.

name
required
string

The name part of "name ".

email
required
string

The email part of "name ".

Responses

revoke

Reovkes a PGP key ring.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

keyid
required
integer <int64>

Specifies the ID of the master key to revoke.

Request Body schema: application/x-www-form-urlencoded
password
required
string

The password of the private key.

reason
string
Default: "no_reason"
Enum: "no_reason" "key_superseded" "key_compromised" "key_retired" "user_no_longer_valid"

Specifies the reason why the key is being revoked.

Responses

getRecipKey

Queries the public key of a recipient.

query Parameters
session
required
string

A session ID previously obtained from the Appsuite HTTP login module.

email
string

The email address of the recipient to search a key for.

keyid
integer <int64>

Instead of using the email parameter it is also possible to perform the search by key ID.

create
boolean

True to create non existing keys for the requested user, False to not create keys with this request (default).

Responses