Publish all version of content in a locale
/km/api/v1/content/{id}/publishAllVersionInThisLocale/{localeCode}
This method publishes all versions of the specified Content translation as specified by the Locale.
When a Content version is published, it can be published live or published pending. To be published live, the Content object must have today's current date and time within the range of its displayStartDate and displayEndDate fields. When a Content object is published live, it is made available to end-users. To be published pending, the Content object must have its displayStartDate field set to a date in the future. On that future date, the Content is published live and made available to end users. Versions of the Content object that remain in the workflow process is not published.
Response Errors
The possible error response for this method is as follows:
- OKDOM-GEN0001  The error occurs when the value of the id parameter or localeId parameter is invalid. 
Request
- 
                    id(required): string
                    
                    The content identifier
- 
                    localeCode(required): string
                    
                    The locale code identifier
Response
- application/json
- application/xml
200 Response
objectResultList ActionResult ContentKey- 
            count: 
            integer
            Number of resource instances returned in the current range.
- 
            hasMore: 
            boolean
            Boolean value that is set to true if more resources are available on the server than the subset returned in current page.
- 
            items: 
            array  items
            
            
- 
            limit: 
            integer
            Actual paging size used by the server.
- 
            links: 
            array  links
            
            
- 
            offset: 
            integer
            Offset value used in the current page.
- 
            totalResults: 
            integer
            Total count of the resource instances, including both the instances in the current range and the instances on the server that satisfy the request.
array- 
            Array of: 
                object  ActionResult ContentKey
            
            Title:ActionResult ContentKey
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
objectActionResult ContentKey- 
            errors: 
            array  KMError Collection
            
            Title:KMError CollectionCollection of KMErrors
- 
            message: 
            string
            This will hold a success and failure message.
- 
            operation: 
            string
            The operation performed like PUBLISH_ACTION, UNPUBLISH_ACTION, etc.
- 
            result: 
            object  ContentKey
            
            Title:ContentKey
- 
            status: 
            
            Allowed Values:[ "COMPLETED", "FAILED", "COMPLETED_WITH_WARNINGS" ]Whether the Action completed successfully or not!
- 
            warningMessage: 
            string
            Only meant for Waring Kind of messages. Like operation was successful but with warnings.
arrayKMError Collection- 
            Array of: 
                object  KMError
            
            Title:KMError
objectContentKey- 
            allTranslations: 
            array  allTranslations
            
            This field will return list of all translated content that the user can view This field will only be populated if allTranslations query parameter is passed in with value true. 
- 
            answerId: 
            integer
            The unique identifier that enables mapping between an answer and the content. 
- 
            articleStatus: 
            object  ArticleStatusKey
            
            Title:ArticleStatusKey
- 
            dateModified: 
            string(date-time)
            The date when the content was last modified in the Oracle Knowledge Repository. 
- 
            displayEndDate: 
            string(date-time)
            The date when the service stops the display of the document to the end users. 
- 
            displayReviewDate: 
            string(date-time)
            The date when the document requires a review by an author capable of performing the review. 
- 
            displayStartDate: 
            string(date-time)
            The date when the document will be available to display to end-users. 
- 
            documentId: 
            string
            The unique identifier of a document that indicates the content type in which the content is saved. 
- 
            latestContent: 
            object  ContentKey
            
            Title:ContentKey
- 
            links: 
            array  links
            
            
- 
            locale: 
            object  LocaleKey
            
            Title:LocaleKey
- 
            publishedContent: 
            object  ContentKey
            
            Title:ContentKey
- 
            rating: 
            object  DataForm
            
            Title:DataForm
- 
            ratingsAggregate: 
            object  AggregateFormResults
            
            Title:AggregateFormResults
- 
            recordId: 
            string
            The unique identifier of the document. This ID is same in all versions in all locales of the document. 
- 
            schemaAttributes: 
            array  schemaAttributes
            
            This field will return list of schema attributes associated with the content type of this content. This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes. 
- 
            title: 
            string
            The tittle of the document. 
- 
            version: 
            string
            Version of the Content object
- 
            versionId: 
            string
            The unique identifier of the specific version of a document in a specific locale. You cannot use this field in queries made using q query parameter. 
objectKMError- 
            errorCode: 
            string
            The Oracle Knowledge defined code for this error.
- 
            errorPath: 
            string
            The XPath of the field to which this error applies.
- 
            title: 
            string
            The error message title
- 
            type: 
            
            Allowed Values:[ "VALIDATION", "AUTHENTICATION", "AUTHORIZATION", "APPLICATION" ]The error type.
arrayThis field will return list of all translated content that the user can view
This field will only be populated if allTranslations query parameter is passed in with value true.
- 
            Array of: 
                object  ContentKey
            
            Title:ContentKey
objectArticleStatusKey- 
            links: 
            array  links
            
            
- 
            name: 
            string
            The localized name of the ArticleStatus object. The name field can only be used for sorting. 
- 
            recordId: 
            string
            The unique identifier of the ArticleStatus object. 
- 
            referenceKey: 
            string
            The reference key for the ArticleStatus object. 
 ArticleStatus objects support multiple languages. This field can be used to identify the associated objects for all languages.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
objectLocaleKey- 
            links: 
            array  links
            
            
- 
            recordId: 
            string
            The unique identifier of the Locale object. 
objectDataForm- 
            dateAdded: 
            string(date-time)
            The date when the DataForm object was created or added
- 
            dateModified: 
            string(date-time)
            The date when the DataForm object was last modified.
- 
            displayEndDate: 
            string(date-time)
            DisplayEndDate of the DataForm object
- 
            displayStartDate: 
            string(date-time)
            DisplayStartDate of the DataForm object
- 
            emailContent: 
            boolean
            EmailContent of the DataForm object
- 
            links: 
            array  links
            
            
- 
            name: 
            string
            The name of the data form. The name field can only be used for sorting.
- 
            questions: 
            array  questions
            
            To Many Relationship to Question
- 
            ratingType: 
            integer
            Determined whether it is a 5 star or Y/N type of rating- CUSTOM(0)
- YES(1)
- YES_NO(2)
- THREE_STARS(3)
- FIVE_STARS(4)
 
- 
            recordId: 
            string
            The unique record ID of the DataForm object.
- 
            referenceKey: 
            string
            The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
- 
            user: 
            object  UserKey
            
            Title:UserKey
- 
            views: 
            array  views
            
            To Many Relationship to View
objectAggregateFormResults- 
            links: 
            array  links
            
            
- 
            questions: 
            array  questions
            
            To Many Relationship to AggregateQuestionResult
- 
            recordId: 
            string
            The unique record ID of the AggregateFormResults object.
- 
            referenceKey: 
            string
            The reference key for the AggregateFormResults object. AggregateFormResults objects support multiple languages. This field can be used to identify the associated objects for all languages.
- 
            totalResponses: 
            integer
            TotalResponses of the AggregateFormResults object
arrayThis field will return list of schema attributes associated with the content type of this content.
This field will only be populated if additionalFields query parameter is passed in with value schemaAttributes.
- 
            Array of: 
                object  SchemaAttribute
            
            Title:SchemaAttribute
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
object- 
            href(required): 
            string
            URI [RFC3986] or URI Template [RFC6570]. If the value is set to URI Template, then the "templated" property must be set to true.
- 
            mediaType: 
            string
            Media type, as defined by RFC 2046, describing the link target.
- 
            method: 
            string
            HTTP method for requesting the target of the link.
- 
            profile: 
            string
            Link to the metadata of the resource, such as JSON-schema, that describes the resource expected when dereferencing the target resource..
- 
            rel(required): 
            string
            Name of the link relation that, in addition to the type property, can be used to retrieve link details. For example, href or profile.
- 
            templated: 
            boolean
            Boolean flag that specifies that "href" property is a URI or URI Template. If the property is a URI template, set this value to true. By default, this value is false.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  DataFormQuestion
            
            Title:DataFormQuestion
objectUserKey- 
            email: 
            string
            Email of the User object
- 
            externalId: 
            integer
            The ExternalId is the Id of the corresponding User from an external system. It, along with ExternalType, can be used to bridge the gap between a User from this system and a User from an external system.
- 
            externalType: 
            string
            The ExternalType is the type of the corresponding User from an external system. It, along with ExternalId, can be used to bridge the gap between a User from this system and a User from an external system.
- 
            links: 
            array  links
            
            
- 
            name: 
            string
            User's full name
- 
            recordId: 
            string
            The unique record ID of the User object.
array- 
            Array of: 
                object  ViewKey
            
            Title:ViewKey
objectDataFormQuestion- 
            answers: 
            array  answers
            
            To Many Relationship to Answer
- 
            dataForm: 
            object  DataFormKey
            
            Title:DataFormKey
- 
            dateAdded: 
            string(date-time)
            The date when the DataFormQuestion object was created or added
- 
            dateModified: 
            string(date-time)
            The date when the DataFormQuestion object was last modified.
- 
            isMasterIdentifier: 
            boolean
            IsMasterIdentifier of the DataFormQuestion object
- 
            links: 
            array  links
            
            
- 
            name: 
            string
            Name of the DataFormQuestion object
- 
            recordId: 
            string
            The unique record ID of the DataFormQuestion object.
- 
            referenceKey: 
            string
            The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
- 
            required: 
            boolean
            Required of the DataFormQuestion object
- 
            sortOrder: 
            integer
            SortOrder of the DataFormQuestion object
- 
            specialTypeIndicator: 
            integer
            SpecialTypeIndicator of the DataFormQuestion object
array- 
            Array of: 
                object  DataFormAnswer
            
            Title:DataFormAnswer
objectDataFormKey- 
            links: 
            array  links
            
            
- 
            recordId: 
            string
            The unique record ID of the DataForm object.
- 
            referenceKey: 
            string
            The reference key for the DataForm object. DataForm objects support multiple languages. This field can be used to identify the associated objects for all languages.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
objectDataFormAnswer- 
            dataFormQuestion: 
            object  DataFormQuestionKey
            
            Title:DataFormQuestionKey
- 
            dateAdded: 
            string(date-time)
            The date when the DataFormAnswer object was created or added
- 
            dateModified: 
            string(date-time)
            The date when the DataFormAnswer object was last modified.
- 
            defaultAnswer: 
            boolean
            DefaultAnswer of the DataFormAnswer object
- 
            links: 
            array  links
            
            
- 
            name: 
            string
            Name of the DataFormAnswer object
- 
            numberValue: 
            integer
            NumberValue of the DataFormAnswer object
- 
            recordId: 
            string
            The unique record ID of the DataFormAnswer object.
- 
            referenceKey: 
            string
            The reference key for the DataFormAnswer object. DataFormAnswer objects support multiple languages. This field can be used to identify the associated objects for all languages.
- 
            sortOrder: 
            integer
            SortOrder of the DataFormAnswer object
objectDataFormQuestionKey- 
            links: 
            array  links
            
            
- 
            recordId: 
            string
            The unique record ID of the DataFormQuestion object.
- 
            referenceKey: 
            string
            The reference key for the DataFormQuestion object. DataFormQuestion objects support multiple languages. This field can be used to identify the associated objects for all languages.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
objectViewKey- 
            links: 
            array  links
            
            
- 
            name: 
            string
            Localized name of the view
- 
            recordId: 
            string
            GUID of the SITE table containing the view definition
- 
            referenceKey: 
            string
            Non localized reference key for the view
- 
            stripeCD: 
            string
            Stripe of a view 
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  AggregateQuestionResult
            
            Title:AggregateQuestionResult
objectAggregateQuestionResult- 
            answers: 
            array  answers
            
            To Many Relationship to AggregateAnswerResult
- 
            averageResponse: 
            number
            AverageResponse of the AggregateQuestionResult object
- 
            name: 
            string
            Localized display name for the Question
- 
            recordId: 
            string
            The unique record ID of the AggregateQuestionResult object.
- 
            referenceKey: 
            string
            The reference key for the AggregateQuestionResult object. AggregateQuestionResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
- 
            totalResponses: 
            integer
            TotalResponses of the AggregateQuestionResult object
array- 
            Array of: 
                object  AggregateAnswerResult
            
            Title:AggregateAnswerResult
objectAggregateAnswerResult- 
            name: 
            string
            Localized display name for the Answer
- 
            recordId: 
            string
            The unique record ID of the AggregateAnswerResult object.
- 
            referenceKey: 
            string
            The reference key for the AggregateAnswerResult object. AggregateAnswerResult objects support multiple languages. This field can be used to identify the associated objects for all languages.
- 
            totalResponses: 
            integer
            TotalResponses of the AggregateAnswerResult object
objectSchemaAttribute- 
            allowMultipleNodes: 
            boolean
            Flag indicating if multiple nodes are allowed of this type @since 8.3
- 
            allowPreselectedUserGroupChange: 
            boolean
            Enable editors to modify preselected user group restrictions @since 8.3
- 
            children: 
            array  children
            
            List of child nodes of the current element
- 
            counter: 
            integer
            This attribute contains the current value of the ContentType DOC ID counter. This value should not be changed after content is added to the ContentType
- 
            counterPrefix: 
            string
            This attribute contains the prefix that is appended to the front of the DOC ID counter
- 
            dateAdded: 
            string(date-time)
            This attribute represents the timestamp when the SchemaAttribute definition was first created
- 
            dateModified: 
            string(date-time)
            This attribute represents the timestamp when the SchemaAttribute definition was last modified
- 
            description: 
            string
            Localized help text for the attribute. This text is displayed in the authoring view
- 
            enableAttributeLevelSearch: 
            boolean
            Flag indicating whether this field should be configured for attribute level searching - i.e. where TITLE='xyz'. This field was previously called searchable @since 8.3
- 
            enableFullTextSearch: 
            boolean
            Flag indicating whether this field should be included in the full text index. This field was previously called indexable @since 8.3
- 
            includeInMasterIdentifier: 
            boolean
            Flag indicating whether this field should be appended to the master identifier of the document
- 
            isNode: 
            boolean
            Flag indicating if this element is a node @since 8.3
- 
            isRequired: 
            boolean
            Make attribute a required field @since 8.3
- 
            links: 
            array  links
            
            
- 
            localizedAttributes: 
            array  localizedAttributes
            
            List of LocalizedAttributes of this SchemaAttribute name and description in various Locales
- 
            name: 
            string
            Localized name of the attribute. This need NOT be unique within the Schema.
- 
            readOnly: 
            boolean
            Flag indicating whether this field is editable
- 
            recordId: 
            string
            Unique identifier for the SchemaAttribute object
- 
            referenceKey: 
            string
            Non localized name of the attribute. SchemaAttribute's referenceKey need NOT be unique within its Schema. But its xpath will be unique within its Schema.
- 
            requireWorkflowApproval: 
            boolean
            Attribute requires workflow approval if workflow is enabled
- 
            schemaAttributeUserGroupList: 
            array  schemaAttributeUserGroupList
            
            List of user groups that can be used to secure this attribute. This should be a subset of the list of user groups assigned to the ContentType
- 
            schemaAttrType: 
            
            Allowed Values:[ "TEXT_AREA", "WYSIWYG_EDIT", "TEXT_FIELD", "FILE", "BOOLEAN", "LIST", "COUNTER", "DATE", "DATETIME", "TIME", "INTEGER", "FLOAT" ]Enumerated type representing the type of attribute - i.e. text field, rich text area
- 
            securedFileResource: 
            boolean
            Flag indicating if this attribute (file types only) should be marked as secure - i.e. stored in the ~secure folder near the content XML file
- 
            secureWithUserGroups: 
            boolean
            Restrict attribute to selected user groups
- 
            securityRegex: 
            string
            The regular expression used to validate the field against security attacks.
- 
            sortOrder: 
            integer
            Display order of the schema attributes within the edit form
- 
            textHeight: 
            string
            Specifies the text height for text areas and rich text fields
- 
            textWidth: 
            string
            Specifies the max length for text fields
- 
            userGroupSelectionRequired: 
            boolean
            User groups are required for attribute
- 
            wysiwygType: 
            
            Allowed Values:[ "BASIC", "MEDIUM", "FULL" ]Type of WYSIWYG rich text field - i.e. FULL, BASIC, MEDIUM @since 8.3
- 
            xpath: 
            string
            The XPATH of this attribute within the schema. This is unique within the Schema.
array- 
            Array of: 
                object  SchemaAttribute
            
            Title:SchemaAttribute
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
array- 
            Array of: 
                object  LocalizedAttributes
            
            Title:LocalizedAttributes
array- 
            Array of: 
                object  SchemaAttributeUserGroup
            
            Title:SchemaAttributeUserGroup
objectLocalizedAttributes- 
            description: 
            string
            Localized description in the above Locale
- 
            localeId: 
            string
            RecordId of the Locale - generally this is the localeCode (like en_US) and NOT a real GUID.
- 
            name: 
            string
            Localized Name in the above Locale
objectSchemaAttributeUserGroup- 
            defaultValue: 
            boolean
            Flag indiacting whether the user group should be selected by default
- 
            recordId: 
            string
            GUID from the XMLSCHEMAATTRIBUTEUSERGROUP table
- 
            userGroup: 
            object  UserGroupKey
            
            Title:UserGroupKey
objectUserGroupKey- 
            externalId: 
            integer
            The unique identifier of the corresponding userGroup from an external system. You can use the External ID with the ExternalType parameter to connect user groups in the internal and the the external systems. 
- 
            externalType: 
            string
            The ExternalType is the type of the corresponding userGroup from an external system. 
- 
            links: 
            array  links
            
            
- 
            name: 
            string
            The localized name of the user group. The name field can only be used for sorting. 
- 
            recordId: 
            string
            The unique identifier from the TAG table that represent a userGroups resource 
- 
            referenceKey: 
            string
            The non localized name of the user group 
- 
            stripeCD: 
            string
            Stripe for UserGroup 
array- 
            Array of: 
                object  instanceLink
            
            Metadata describing link description objects that MAY appear in the JSON instance representation.
Examples
The following example shows how to publish all versions of the specified Content translation as specified by the Locale:
curl -X POST "https://<IM_REST_API_HOST>/km/api/latest/content/{id}/publishAllVersionInThisLocale/{localeCode}" -u "<username:password>" -H "Accept: application/json" -H "Content-Type: application/json"Example of Response Body
The following shows an example of the response body in JSON format.
{
  "items": [
    {
      "result": {
        "recordId": "CA5811F397DC47578EA6DF343408D9BA",
        "versionId": "D2C011D0A5114D998C86F07943A2D137",
        "documentId": "FAQ12",
        "title": "Q query  Testing",
        "version": "1.0",
        "answerId": 1001002,
        "locale": {
          "recordId": "en_US"
        },
        "dateModified": "2018-11-26T13:29:35+0530"
      },
      "status": "COMPLETED",
      "operation": "PUBLISH_ACTION",
      "warningMessage": null,
      "message": "Content was Published for versionID D2C011D0A5114D998C86F07943A2D137",
      "errors": []
    }
  ],
  "hasMore": false,
  "links": [
    {
      "rel": "canonical",
      "href": "https://<IM_REST_API_HOST>/km/api/latest/content/CA5811F397DC47578EA6DF343408D9BA/publishAllVersionInThisLocale/en_US?limit=20&offset=0",
      "mediaType": "application/json, application/xml",
      "method": "GET"
    }
  ],
  "count": 1
}