Find all

get

/km/api/v1/contentTypes

This method returns a list of ContentType objects from the Oracle Knowledge Repository.

This resource supports the orderBy request parameter, which allows you to sort the returned list of ContentType objects.

You can find different values to use with the orderBy parameter in the schema and catalog information of the resource. To get the schema and catalog information, use GET method with the mediaType value as 'application/schema+json' in the HTTP request.

The example URI to get schema and catalog of the resource is as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/contentTypes

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/contentTypes

    The request returns a paginated list of ContentType objects in the DATA mode. By default, ContentType objects are sorted according to the referenceKey value in ascending order.

  • http://<IM_REST_API_HOST>/km/api/contentTypes?mode=KEY

    The request returns a paginated list of ContentType objects in the KEY mode.

  • http://<IM_REST_API_HOST>/km/api/contentTypes?orderBy=name:asc

    The request returns a paginated list of ContentType objects in the DATA mode. Objects in the list are sorted according to the names of the ContentType objects.




Find by query

Supported Media Types: 'application/json', 'application/xml'



This method returns a list of ContentType objects that match the specified criteria.

This resource supports the orderBy request parameter, which allows you to sort the returned list of ContentType objects.

You can find different values to use with the orderBy parameter in the schema and catalog information of the resource. To get the schema and catalog information, use GET method with the mediaType value as 'application/schema+json' in the HTTP request.

The example URI to get schema and catalog of the resource is as follows:

  • http://<IM_REST_API_HOST>/km/api/latest/metadata-catalog/contentTypes

Example URIs

The example URIs for this method are as follows:

  • http://<IM_REST_API_HOST>/km/api/contentTypes?q=referenceKey eq 'FAQ'

    The request returns a paginated list of ContentType objects in the DATA mode, having FAQ as the reference Key value.

  • http://<IM_REST_API_HOST>/km/api/contentTypes?q=translationRequestLocales.id in ('en_US', 'es_ES', 'iT_IT')&mode=FULL

    The request returns a paginated list of ContentType objects, which are configured to generate automatic translation request while content authoring. The request is generated for specified languages such as: English United States, Peninsular Spanish, and Italian.

Response Errors

The possible error responses for this method are as follows:

  • OKDOM-CRIT0025

    The error occurs when an invalid criteria field is specified in the request.

Query Parameters

The following table describes the query parameters for this resource.

ParameterQueryableSortableTypeDescription
recordIdYY'type' : 'string'

The unique identifier of the ContentType object.

referenceKeyYY'type' : 'string'

The reference key for the ContentType object.

ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages.

nameNY'type' : 'string'

The name for the ContentType object. The name field can only be used for sorting.

Content Types support multiple languages. This field identifies the object associated with the language specified by the user.

descriptionYY'type' : 'string'

The description for the ContentType object. Content Types support multiple languages.

This field identifies the object associated with the language specified by the user.

allowCheckOutYY'type' : 'boolean'

The flag indicates whether the ContentType object allows the content to be checkoutedout, to prevent other authors from editing the same content.

allowRecommendationsYY'type' : 'boolean'

The flag indicates whether the content type allows end users to create recommendations for its contents. This also indicates whether you can associate the recommended content with a content type.

counterPrefixYY'type' : 'string'

The prefix used with all document IDs in a content type. For example, FA is the contentPrefix of the content type FAQ. All document IDs in the content type FAQ begins with the affix FA.

dateAddedYY'type' : 'string', 'format' : 'date-time'

The date when the content type was created.

dateModifiedYY'type' : 'string', 'format' : 'date-time'

The date when the content type was last modified.

defaultLifespanYY'type' : 'integer'

The total number of days that the content is available to the end user. It indicates that the content will be available to end users for the specified number of days, starting from the day when the content was created.

enableUserActivityLoggingYY'type' : 'boolean'

The flag indicates whether the system tracks the user interactions with the content.

hasPriorityYY'type' : 'boolean'

The flag indicates whether you can assign priority level to the content in the content type. Valid priority values are numbers from one to twenty and none.

hasRelatedContentYY'type' : 'boolean'

The flag indicates whether the content type allows related documents to be specified while content authoring.

hasTalkBackYY'type' : 'boolean'

The flag indicates whether you can open discussions for contents in the content type.

isEventYY'type' : 'boolean'

The flag indicates whether the content type supports different event dates.

isModeratedYY'type' : 'boolean'

The flag indicates whether the content needs moderation, for its open discussions, before the discussions are made public.

notifyOnWorkflowApprovalYY'type' : 'boolean'

The flag indicates whether the appropriate content author should be notified when a workflow approval step is completed.

notifyOnWorkflowRejectionYY'type' : 'boolean'

The flag indicates whether the appropriate content author should be notified when the document is rejected.

notifyGroupOnWorkflowRejectionYY'type' : 'boolean'

The flag indicates whether notifications should be sent to content authors when the document is rejected.

removeVersionsYY'type' : 'boolean'

The flag indicates whether to remove the minor versions of the content after publication.

reviewDateYY'type' : 'integer'

The date on which the document requires review.

When the date approaches, the system generates a task for the appropriate author to review the content.

validateHtmlYY'type' : 'boolean'

The flag indicates whether the content should be validated to adhere to HTML standards while content authoring.

enableIndexingYY'type' : 'boolean'

The flag indicates whether the Oracle Knowledge Search Indexing is enabled for the content type.

indexStatusYY'enum' : ['LIVE', 'LATEST_VALID_DRAFT', 'LIVE_AND_LATEST_VALID_DRAFT', 'NONE']

The status of the documents assigned to have Oracle Knowledge Search indexing.

The valid values are:

  • LIVE
  • LATEST_VALID_DRAFT
  • LIVE_AND_LATEST_VALID_DRAFT
  • NONE
ratingYN'$ref' : '#/definitions/RatingKey'

The rating system assigned to the content type.

userGroupsYN'$ref' : '#/definitions/ListUserGroupKey'

The UserGroup objects associated with the content type. Content authors assign a user Group to the content, so that users with a certain level of access will have access to the content.

customMetricsYN'$ref' : '#/definitions/ListCustomMetricKey'

The unit of measurement used to track the activities on the content in a content type.

requiredCategoriesYN'$ref' : '#/definitions/ListCategoryKey'

The Category objects that the content type requires for all its contents. The content authors must assign these categories to the content while content authoring. Authors are not allowed to save the content if they do not assign the categories.

categoriesYN'$ref' : '#/definitions/ListCategoryKey'

The list of Category objects configured in the content type, which are available to the content authors to assign to the content. The Category objects are used to tag or label the content to improve searchability.

translationRequestLocalesYN'$ref' : '#/definitions/ListLocaleKey'

The list of Locale objects for which the automatic translation request is enabled in the content type. The content type sends translation requests to content translators of specific set of languages, each time the content is ready for publication.

workflowYN'$ref' : '#/definitions/WorkflowKey'

The workflow definition that the author can use while content authoring in a content type.

Request

Query Parameters
  • This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
  • This parameter defines amount of information to be included in the returned resources - KEY is the one that has least information (and hence performs better) and FULL is the one that has most information.
    Allowed Values: [ "KEY", "DATA", "EXTENDED", "FULL" ]
  • Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
  • This parameter orders a resource collection based on the specified attributes. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and 'asc' or 'desc'. Specify 'asc' for ascending and 'desc' for descending. The default value is 'asc'. For example, ?orderBy=field1:asc,field2:desc.
  • Value for this parameter should be Oracle Knowledge Q query - see the 'Getting Started' documentation ('Querying' page) of this operation and documentation for Q query.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : ResultList ContentTypeData
Type: object
Title: ResultList ContentTypeData
Match All
Show Source
Nested Schema : Collection Paging Resource
Title: Collection Paging Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Base Collection Resource
Title: Base Collection Resource
Oracle base collection resource schema definition.
Match All
Show Source
Nested Schema : Singular Resource
Type: object
Title: Singular Resource
Oracle base singular resource schema definition.
Show Source
Nested Schema : Base Collection Resource-allOf[1]
Type: object
Show Source
Nested Schema : Collection Paging Resource-allOf[1]
Type: object
Show Source
Nested Schema : ResultList ContentTypeData-allOf[1]
Type: object
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: array
Show Source
Nested Schema : ContentTypeData
Match All
Show Source
Nested Schema : ContentTypeKey
Match All
Show Source
Nested Schema : ContentTypeKey-allOf[1]
Type: object
Show Source
  • The description for the ContentType object. Content Types support multiple languages.

    This field identifies the object associated with the language specified by the user.

  • The name for the ContentType object. The name field can only be used for sorting.

    Content Types support multiple languages. This field identifies the object associated with the language specified by the user.

  • The unique identifier of the ContentType object.

  • The reference key for the ContentType object.

    ContentType objects support multiple languages. This field can be used to identify the associated objects for all languages.

Nested Schema : ContentTypeData-allOf[1]
Type: object
Show Source
Back to Top

Examples

The following example shows how to find all Content Type objects from Oracle Knowledge repository by submitting a get request on the REST resource using cURL.

cURL Command

Command: curl -X "GET" "http://<IM_REST_API_HOST>/km/api/latest/contentTypes"

Example of Request Header

The following shows an example of the request header.

-H "kmauthtoken: {\"siteName\":\"ORACLE_KNOWLEDGE\",\"integrationUserToken\":\"\"+eCJYkxKwj5HUaIiJYun0/TpatwT1LmtcsF05W33xnEojifV/AsLDj9RpN0lKuorTMNKeSE1tgC7svVL+BzntqDON4KiM1HFlpxvXEUCB0P2w0Xrs75McygqxdVaDSE9"}" \
-H "Accept: application/json"

Example of Response Body

The following shows an example of the response body in JSON format.

{
  "items" : [ {
    "allowCheckOut" : true,
    "allowRecommendations" : true,
    "counterPrefix" : "COUNTERPREFIX_VALUE",
    "dateAdded" : "2013-04-23T23:28:49EDT",
    "dateModified" : "2013-04-23T23:28:49EDT",
    "defaultLifespan" : -1675196684,
    "enableUserActivityLogging" : true,
    "hasPriority" : true,
    "hasRelatedContent" : true,
    "hasTalkBack" : true,
    "isEvent" : true,
    "isModerated" : true,
    "requireAtLeastOneCategory" : true,
    "requireAtLeastOneUserGroup" : true,
    "restrictToOneUserGroupSelection" : true,
    "categoriesRequireWorkflowApproval" : true,
    "userGroupRequireWorkflowApproval" : true,
    "viewsRequireWorkflowApproval" : true,
    "displayDatesRequireWorkflowApproval" : true,
    "eventDatesRequireWorkflowApproval" : true,
    "restrictAuthoringToWorkflowUser" : true,
    "notifyOnWorkflowApproval" : true,
    "notifyOnWorkflowRejection" : true,
    "notifyGroupOnWorkflowRejection" : true,
    "removeVersions" : true,
    "reviewDate" : 33978171,
    "validateHtml" : true,
    "enableIndexing" : true,
    "indexStatus" : "LIVE",
    "referenceKey" : "REFERENCEKEY_VALUE",
    "name" : "NAME_VALUE",
    "links" : [ {
      "rel" : "canonical",
      "href" : "http://<IM_REST_API_HOST>/km/api/{version}/{resourceURI}",
      "mediaType" : "application/json, application/xml",
      "templated" : true,
      "method" : "GET",
      "profile" : "http://<IM_REST_API_HOST>/km/api/{version}/metadata-catalog/{resourceName}"
    } ]
  } ],
  "hasMore" : false,
  "limit" : 20,
  "offset" : 0,
  "links" : [ {
    "rel" : "canonical",
    "href" : "http://<IM_REST_API_HOST>/km/api/{version}/contentTypes?limit=20&offset=0",
    "mediaType" : "application/json, application/xml",
    "method" : "GET"
  } ],
  "count" : 1
}
Back to Top