Org Content

Replace the settings of one content type

PUT/org-content/settings/{id}

Sets how the organisation sorts one type of content, from the values in the schema; null goes back to the default. Lists then follow it unless the request names a sort. Needs permission to manage the organisation's content. It has no dry run, and no webhook, email or notification is sent. Sending the earlier value undoes it.

Path parameters

  • idstringRequired#

    The content type: news, event or resource.

    One of: news, event, resource

Request body

application/json, required · OrgContentSettingReplace

  • sortstring | nullRequired#

    How the type is ordered after the featured item: title, date_modified, date_created, oldest_to_newest, newest_to_oldest, publish_date_oldest_to_newest or publish_date_newest_to_oldest. null restores the default, newest_to_oldest.

    One of: title, date_modified, date_created, oldest_to_newest, newest_to_oldest, publish_date_oldest_to_newest, publish_date_newest_to_oldest
{
  "sort": "title"
}

Responses

200

The setting as saved.

OrgContentSetting
{
  "data": {
    "type": "news",
    "sort": "title"
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X PUT https://your-org-domain/kong/core/api/v2/org-content/settings/{id}\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "sort": "title"
}'