Settings (v1)

getBaseUrl

Get the base URL of the front-end user interface.

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Responses

Response samples

Content type
application/json

setBaseUrl

Set the base URL of the front-end user interface.

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Request Body schema: application/json
baseUrl
required
string

Front-end user interface URL without tailing slash

Responses

Request samples

Content type
application/json

Response samples

Content type
No sample

getLocale

Get the locale settings for the tenant.

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Responses

Response samples

Content type
application/json
{
  • "locale": "string",
  • "currency": "string",
  • "timezone": "string",
  • "numberingSystem": "string"
}

setLocale

Set the locale settings for the tenant.

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Request Body schema: application/json
locale
required
string

The locale for language display, date format, etc., for example 'en-US' or 'sv' or 'es-419'

currency
required
string

Primary currency, for example USD, EUR, INR

timezone
required
string

The time zone when showing date time information, for example 'UTC', 'America/New_York'

numberingSystem
required
string

The system used for numeral display, either latn or arab

Responses

Request samples

Content type
application/json
{
  • "locale": "string",
  • "currency": "string",
  • "timezone": "string",
  • "numberingSystem": "string"
}

Response samples

Content type
No sample

getTenantAddresses

Get tenant addresses

query Parameters
query
string

CQL query

limit
integer >= 0
Default: 10

Limit the number of elements returned in the response

offset
integer >= 0
Default: 0

Skip over number of elements (default is first element)

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Responses

Response samples

Content type
application/json
{
  • "addresses": [
    ]
}

createTenantAddress

Create tenant address

query Parameters
query
string

CQL query

limit
integer >= 0
Default: 10

Limit the number of elements returned in the response

offset
integer >= 0
Default: 0

Skip over number of elements (default is first element)

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Request Body schema: application/json
id
string <uuid>

Identifier

name
required
string

Display name for the address

address
required
string

Address text

object (metadata)

Metadata containing user and date information

createdByUserId
string <uuid>

Created by user id

createdDate
required
string

Creation date

updatedByUserId
string <uuid>

Updated by user id

updatedDate
string

Update date

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": "string",
  • "metadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": "string",
  • "metadata": {
    }
}

getTenantAddress

Get tenant address by id

path Parameters
id
required
string <uuid>

Tenant address identifier

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": "string",
  • "metadata": {
    }
}

updateTenantAddress

Update tenant address

path Parameters
id
required
string <uuid>

Tenant address identifier

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Request Body schema: application/json
id
string <uuid>

Identifier

name
required
string

Display name for the address

address
required
string

Address text

object (metadata)

Metadata containing user and date information

createdByUserId
string <uuid>

Created by user id

createdDate
required
string

Creation date

updatedByUserId
string <uuid>

Updated by user id

updatedDate
string

Update date

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": "string",
  • "metadata": {
    }
}

Response samples

Content type
No sample

deleteTenantAddress

Delete tenant address

path Parameters
id
required
string <uuid>

Tenant address identifier

header Parameters
X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

Responses

Response samples

Content type
No sample

getSettings

Get settings with optional CQL query. If X-Okapi-Permissions includes mod-settings.global.read.SCOPE then settings without a userId are returned. If X-Okapi-Permissions includes mod-settings.users.read.SCOPE then settings with a userId are returned. If X-Okapi-Permissions includes mod-settings.owner.read.SCOPE then settings with userId = current-user are returned.

query Parameters
limit
integer >= 0
Default: 10

Limit the number of elements returned in the response

offset
integer >= 0
Default: 0

Skip over number of elements (default is first element)

query
string

CQL query

header Parameters
X-Okapi-Permissions
required
string

A JSON array with client permissions

X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

X-Okapi-User-Id
string

Okapi user identifier

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "resultInfo": {
    }
}

postSetting

Create setting entry. If X-Okapi-Permissions includes mod-settings.global.write.SCOPE, then a setting without a userId may be created. If X-Okapi-Permissions includes mod-settings.users.write.SCOPE, then a setting with a userId may be created. If X-Okapi-Permissions includes mod-settings.owner.write.SCOPE, then a setting with userId = current-user may be created.

query Parameters
limit
integer >= 0
Default: 10

Limit the number of elements returned in the response

offset
integer >= 0
Default: 0

Skip over number of elements (default is first element)

query
string

CQL query

header Parameters
X-Okapi-Permissions
required
string

A JSON array with client permissions

X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

X-Okapi-User-Id
string

Okapi user identifier

Request Body schema: application/json
id
required
string <uuid>

Identifier

scope
required
string

Scope for this entry (normally a module)

key
required
string

Key within scope for this setting

value
required
any

Settings value (any type)

userId
string <uuid>

Owner of this setting (optional)

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "scope": "string",
  • "key": "string",
  • "value": null,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"
}

Response samples

Content type
No sample

getSetting

Get setting. If X-Okapi-Permissions includes mod-settings.global.read.SCOPE, then a setting without a userId may be retrieved. If X-Okapi-Permissions includes mod-settings.users.read.SCOPE, then a setting with a userId may be retrieved. If X-Okapi-Permissions includes mod-settings.owner.read.SCOPE, then a setting with userId = current-user may be retrieved.

path Parameters
id
required
string <uuid>

Settings entry identifier

header Parameters
X-Okapi-Permissions
required
string

A JSON array with client permissions

X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

X-Okapi-User-Id
string

Okapi user identifier

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "scope": "string",
  • "key": "string",
  • "value": null,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"
}

putSetting

Update setting. If X-Okapi-Permissions includes mod-settings.global.write.SCOPE, then a setting without a userId may be updated. If X-Okapi-Permissions includes mod-settings.users.write.SCOPE, then a setting with a userId may be updated. If X-Okapi-Permissions includes mod-settings.owner.write.SCOPE, then a setting with userId = current-user may be updated.

path Parameters
id
required
string <uuid>

Settings entry identifier

header Parameters
X-Okapi-Permissions
required
string

A JSON array with client permissions

X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

X-Okapi-User-Id
string

Okapi user identifier

Request Body schema: application/json
id
required
string <uuid>

Identifier

scope
required
string

Scope for this entry (normally a module)

key
required
string

Key within scope for this setting

value
required
any

Settings value (any type)

userId
string <uuid>

Owner of this setting (optional)

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "scope": "string",
  • "key": "string",
  • "value": null,
  • "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b"
}

Response samples

Content type
No sample

deleteSetting

Delete setting. If X-Okapi-Permissions includes mod-settings.global.write.SCOPE, then a setting without a userId may be deleted. If X-Okapi-Permissions includes mod-settings.users.write.SCOPE, then a setting with a userId may be deleted. If X-Okapi-Permissions includes mod-settings.owner.write.SCOPE, then a setting with userId = current-user may be deleted.

path Parameters
id
required
string <uuid>

Settings entry identifier

header Parameters
X-Okapi-Permissions
required
string

A JSON array with client permissions

X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

X-Okapi-User-Id
string

Okapi user identifier

Responses

Response samples

Content type
No sample

uploadSettings

Upload settings. The entries are inserted or updated depending on whether key, scope, userId already. Each entry gets a unique identifier assigned if it's a new setting. The id must not be supplied. If X-Okapi-Permissions includes mod-settings.global.write.SCOPE, then a setting without a userId may be created/updated. If X-Okapi-Permissions includes mod-settings.users.write.SCOPE, then a setting with a userId may be created/updated. If X-Okapi-Permissions includes mod-settings.owner.write.SCOPE, then a setting with userId = current-user may be created/updated.

header Parameters
X-Okapi-Permissions
required
string

A JSON array with client permissions

X-Okapi-Tenant
required
string^[_a-z][_a-z0-9]*$

Okapi Tenant

X-Okapi-Token
string

Okapi Token

X-Okapi-Url
string

Okapi URL

X-Okapi-User-Id
string

Okapi user identifier

Request Body schema: application/json
Array
scope
required
string

Scope for this entry (normally a module)

key
required
string

Key within scope for this setting

value
required
any

Settings value (any type)

userId
string <uuid>

Owner of this setting (optional)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "inserted": 0,
  • "updated": 0
}