/AWS1/IF_WIS=>UPDATECONTENT()¶
About UpdateContent¶
Updates information about the content.
Method Signature¶
METHODS /AWS1/IF_WIS~UPDATECONTENT
IMPORTING
!IV_KNOWLEDGEBASEID TYPE /AWS1/WISUUIDORARN OPTIONAL
!IV_CONTENTID TYPE /AWS1/WISUUIDORARN OPTIONAL
!IV_REVISIONID TYPE /AWS1/WISNONEMPTYSTRING OPTIONAL
!IV_TITLE TYPE /AWS1/WISCONTENTTITLE OPTIONAL
!IV_OVERRIDELINKOUTURI TYPE /AWS1/WISURI OPTIONAL
!IV_REMOVEOVERRIDELINKOUTURI TYPE /AWS1/WISBOOLEAN OPTIONAL
!IT_METADATA TYPE /AWS1/CL_WISCONTENTMETADATA_W=>TT_CONTENTMETADATA OPTIONAL
!IV_UPLOADID TYPE /AWS1/WISUPLOADID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wisupdatecontentrsp
RAISING
/AWS1/CX_WISACCESSDENIEDEX
/AWS1/CX_WISPRECONDFAILEDEX
/AWS1/CX_WISRESOURCENOTFOUNDEX
/AWS1/CX_WISVALIDATIONEX
/AWS1/CX_WISCLIENTEXC
/AWS1/CX_WISSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_knowledgebaseid TYPE /AWS1/WISUUIDORARN /AWS1/WISUUIDORARN¶
The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN
iv_contentid TYPE /AWS1/WISUUIDORARN /AWS1/WISUUIDORARN¶
The identifier of the content. Can be either the ID or the ARN. URLs cannot contain the ARN.
Optional arguments:¶
iv_revisionid TYPE /AWS1/WISNONEMPTYSTRING /AWS1/WISNONEMPTYSTRING¶
The
revisionIdof the content resource to update, taken from an earlier call toGetContent,GetContentSummary,SearchContent, orListContents. If included, this argument acts as an optimistic lock to ensure content was not modified since it was last read. If it has been modified, this API throws aPreconditionFailedException.
iv_title TYPE /AWS1/WISCONTENTTITLE /AWS1/WISCONTENTTITLE¶
The title of the content.
iv_overridelinkouturi TYPE /AWS1/WISURI /AWS1/WISURI¶
The URI for the article. If the knowledge base has a templateUri, setting this argument overrides it for this piece of content. To remove an existing
overrideLinkOurUri, exclude this argument and setremoveOverrideLinkOutUrito true.
iv_removeoverridelinkouturi TYPE /AWS1/WISBOOLEAN /AWS1/WISBOOLEAN¶
Unset the existing
overrideLinkOutUriif it exists.
it_metadata TYPE /AWS1/CL_WISCONTENTMETADATA_W=>TT_CONTENTMETADATA TT_CONTENTMETADATA¶
A key/value map to store attributes without affecting tagging or recommendations. For example, when synchronizing data between an external system and Wisdom, you can store an external version identifier as metadata to utilize for determining drift.
iv_uploadid TYPE /AWS1/WISUPLOADID /AWS1/WISUPLOADID¶
A pointer to the uploaded asset. This value is returned by StartContentUpload.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wisupdatecontentrsp /AWS1/CL_WISUPDATECONTENTRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->updatecontent(
it_metadata = VALUE /aws1/cl_wiscontentmetadata_w=>tt_contentmetadata(
(
VALUE /aws1/cl_wiscontentmetadata_w=>ts_contentmetadata_maprow(
value = new /aws1/cl_wiscontentmetadata_w( |string| )
key = |string|
)
)
)
iv_contentid = |string|
iv_knowledgebaseid = |string|
iv_overridelinkouturi = |string|
iv_removeoverridelinkouturi = ABAP_TRUE
iv_revisionid = |string|
iv_title = |string|
iv_uploadid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_contentdata = lo_result->get_content( ).
IF lo_contentdata IS NOT INITIAL.
lv_arn = lo_contentdata->get_contentarn( ).
lv_uuid = lo_contentdata->get_contentid( ).
lv_arn = lo_contentdata->get_knowledgebasearn( ).
lv_uuid = lo_contentdata->get_knowledgebaseid( ).
lv_name = lo_contentdata->get_name( ).
lv_nonemptystring = lo_contentdata->get_revisionid( ).
lv_contenttitle = lo_contentdata->get_title( ).
lv_contenttype = lo_contentdata->get_contenttype( ).
lv_contentstatus = lo_contentdata->get_status( ).
LOOP AT lo_contentdata->get_metadata( ) into ls_row.
lv_key = ls_row-key.
lo_value = ls_row-value.
IF lo_value IS NOT INITIAL.
lv_nonemptystring = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_contentdata->get_tags( ) into ls_row_1.
lv_key_1 = ls_row_1-key.
lo_value_1 = ls_row_1-value.
IF lo_value_1 IS NOT INITIAL.
lv_tagvalue = lo_value_1->get_value( ).
ENDIF.
ENDLOOP.
lv_uri = lo_contentdata->get_linkouturi( ).
lv_url = lo_contentdata->get_url( ).
lv_timestamp = lo_contentdata->get_urlexpiry( ).
ENDIF.
ENDIF.