WebCenter REST API: Add items to a Stringlist?

Hello

How can I add items to a Stringlist? My asset has a multiple attribute and I want to insert items.

How can I do?

I finally got.

https://support.Oracle.com/epmos/faces/DocumentDisplay?_afrLoop=563491042188574&parent=document&SourceID=1528601.1&ID=1510322.1&_afrWindowMode=0&_adf.CTRL-State=m55lxhl4z_58

It s like this:

sourceAssetAttribute = new Attribute();

sourceAssetAttributeData = new Data();

sourceAssetAttribute.setName ("attribute_name");

sourceAssetAttributeData.getStringLists (.add(0,"Asset_type:"+asset_id));))

sourceAssetAttributeData.getStringLists (.add(1,"Asset_type:"+asset_id));))

sourceAssetAttribute.setData (sourceAssetAttributeData);

sourceAsset.getAttributes () .add (sourceAssetAttribute);

Tags: Fusion Middleware

Similar Questions

  • How to get assets via the REST API (Webcenter Sites)

    Hello world

    I need to get assets via the REST API using Javascript, but I don't know how to open a session. Can someone explain to me how do?

    I would really appreciate it.

    I also followed this guide Oracle Webcenter REST API permission | Stories of official codification but does not work.

    Best regards!

    Hello rvillamarin,

    Take a look at https://docs.oracle.com/cd/E29542_01/doc.1111/e29634/wemsecurity.htm#WBCSD306. With this, you should be able to get a ticket, to pass at the request of the REST.

    Kind regards

    Stephan.

  • WebCenter Sites REST API: How to add multiple attributes to Active?

    I created an asset with a multiple attribute, as for example, a set of images.

    I would like to insert images of this asset with the Webcenter Sites REST API but I Don t know how.

    Single attribute is like this:

    sourceAssetAttribute = new Attribute();
      sourceAssetAttributeData = new Data();
      sourceAssetAttribute.setName("FSIILongDescription");
      sourceAssetAttributeData.setStringValue("Test Long Description");
      sourceAssetAttribute.setData(sourceAssetAttributeData);
      sourceAsset.getAttributes().add(sourceAssetAttribute);

    And multiple is how?

    I finally got.

    https://support.Oracle.com/epmos/faces/DocumentDisplay?_afrLoop=563491042188574&parent=document&SourceID=1528601.1&ID=1510322.1&_afrWindowMode=0&_adf.CTRL-State=m55lxhl4z_58

    It s like this:

    sourceAssetAttribute = new Attribute();

    sourceAssetAttributeData = new Data();

    sourceAssetAttribute.setName ("attribute_name");

    sourceAssetAttributeData.getStringLists (.add(0,"Asset_type:"+asset_id));))

    sourceAssetAttributeData.getStringLists (.add(1,"Asset_type:"+asset_id));))

    sourceAssetAttribute.setData (sourceAssetAttributeData);

    sourceAsset.getAttributes () .add (sourceAssetAttribute);

  • Version of spring with rest api sites webcenter

    Hello world!

    I use other api sites webcenter, with this library: com.fatwire.wem.api.rest 11.1.1.8.0, com.fatwire.wem - sso-api-case - 11.1.1.8.0, com.fatwire.wem - sso-api - 11.1.1.8.0 in an application of spring with the 3.2.10.RELEASE version. And it works very well! I make a list of the assets and all its attributes, but I need use this application with spring version 4.0.6.RELEASE, then when I update the version of spring the rest api that libraries do not work. It's the method that fails:

    SSOSession ssoSession is SSO. getSSOSession (baseUri);

    multiticket = ssoSession.getMultiTicket (username, password); -> Error LINE

    baseResource is baseResource.queryParam ("multiticket", multiticket);.

    This because the application cannot get a mutiticket. I use the same code and the same structure only changes the spring version. Oracle webcenter is updated with all the patches up to this date.

    How can we solve this problem?

    THX

    SOLVED

    Private Sub authenticate() throws {RestConnectionException}

    try {}

    SSOSession ssoSession = SSO.getSSOSession ("CASConfig.xml");

    multiticket = ssoSession.getMultiTicket (username, password);

    baseResource = baseResource.queryParam ("multiticket", multiticket);

    } catch (SSOException e) {}

    throw new RestConnectionException (e);

    }

    }

    CASConfig.xml

    http://www.springframework.org/schema/MVC ".
    "" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
    "xmlns:beans ="http://www.springframework.org/schema/beans"
    "xmlns: jee ="http://www.springframework.org/schema/jee"xmlns:tx ="http://www.springframework.org/schema/tx"
    "xsi: schemaLocation ="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/JEE http://www.springframework.org/schema/JEE/spring-JEE.xsd http://www.springframework.org/schema/TX http://www.springframework.org/schema/TX/spring-TX.xsd">."

    ': http://application-tier server: port/AR ' / >

    ': http://application-tier server: port/AR ' / >


    Add the casconfig to the classpath in the spring, set up the server and port in xml and it works!

  • Add vNIC PortGroup scope with the REST API security group

    I created a security group within the reach of a PortGroup via the REST API. Now, I'm trying to add a vNIC, also via the REST API.

    To help illustrate, I have a JMTest1 VM with 1 vNIC connected to the PortGroup which is the scope of the security group. When I change this group the first item in the list that could be added to the security group is the first (and only) JMTest1 vNIC.

    AddvNICToSecurityGroup.PNG

    To add it via the REST API, I need to provide the following:

    https://192.168.x.x/API/2.0/services/SecurityGroup/SecurityGroup-XX/members/ < member-moref >

    for example I need to understand what the < member-moref > for the vNIC to JMTest1 and this is what I have a problem with.

    If I add the vNIC through the user interface and then interrogate the security group it gives me below the answer:

    < securitygroup >

    < objectIdobjectId > securitygroup-xx < / objectId >

    < type >

    < typeName > SecurityGroup < / typeName >

    < / type >

    < name > JMTest7 < / name >

    < description / >

    < revision > 9 < / revision >

    < objectTypeName > SecurityGroup < / objectTypeName >

    < scope >

    < id > dvportgroup-xxxxx / < ID >

    < objectTypeName > DistributedVirtualPortgroup < / objectTypeName >

    < name > dv-xxxxx < / name >

    < / scope >

    < extendedAttributes / >

    < inheritanceAllowed > false < / inheritanceAllowed >

    < member >

    500758f6-b97b - 7A 79 - 0c < objectId > 04 - 996f53edf3f0.000 < / objectId >

    < type >

    Vnic < typeName > < / typeName >

    < / type >

    < name > JMTest1 - NIC 1 < / name >

    < revision > 6 < / revision >

    < objectTypeName > Vnic < / objectTypeName >

    < scope >

    < id > vm-xxxxx / < ID >

    < objectTypeName > VirtualMachine < / objectTypeName >

    < name > JMTest1 < / name >

    < / scope >

    < extendedAttributes / >

    < / member >

    < / securitygroup >

    It seems that the < member-moref > for the JMTest1 vNIC is < objectId > 500758f6-b97b - a 7, 79 - 0c 04 - 996f53edf3f0.000 < / objectId >

    If I run now:

    https://192.168.x.x/API/2.0/services/SecurityGroup/SecurityGroup-XX/members/500758f6-b97b-7a79-0c04-996f53edf3f0.000

    then the vNIC is successfully added to the security group. (yay!) So I am now left with the task of how to get

    500758f6-b97b - 7A 79 - 0c < objectId > 04 - 996f53edf3f0.000 < / objectId >

    of a vNIC?

    I have looked at the object in the Mob vCenter and via PowerCLI, but cannot see how to derive from it.

    Anyone know the answer to that?

    The uuid vnic is created by concatenating the vm instanceUuid + '. ' + the last three digits of the vnic device key.  (The vnic is located in the area of the config.hardware.device of the virtual machine and the key will be to shape 4xxx, where xxx represents the 3 numbers you need).

  • Add a contact e-mail group via the Rest API

    Hello

    Is it possible to add a contact to a group of e-mail through the Rest API?

    I saw this article here http://topliners.eloqua.com/docs/DOC-3526 which shows that you can get a subscription email group contacts status, however it is not clear how actually to add a contact to a group of e-mail via the API.

    I tried to post data to ' data/contact / {id} / groups/email/subscription "but I get a response of"Method not allowed"API."

    If someone managed to achieve? If so, how?

    See you soon

    Hi David,

    The POST operation is not supported by this endpoint, but you can use PUT a method for updating subscriptions Contact:

    • PUT: / data/contact / {id} / email/group / {groupId} / subscription

    Where the request body contains an object of the subscription. Hope this helps and please let us know if you need more information.

    Thank you

    Fred

  • Question: Is it possible to add a contact to a shared list using REST API?

    Maybe it's just me being blind... Is it possible to add a contact to a shared list using the REST API?

    Thank you!

    ADI

    OTHER offers:

    PUT API/REST/1.0/assets/contact/list/{id}

  • Rest api webcenter State or walk of a workflow

    Hi people!

    I need your help, I am using the Rest API of oracle webcenter sites, but I have not found how to get the information from a specific asset in a workflow, for example: workflow, update, lately published, responsible role etc.

    I need know if a specific asset has been approved for all steps whit the rest api.

    Is this possible?

    Thanks in advance.

    Currently, there is no REST out-of-the-box service that allows to query or return information of workflow. If you need this report REST you can write your own page of utility (SiteEntry and CSElement) who works in a relaxing way, taking arguments and retrieve the necessary data based on workflow JSP tags, then return an XML response.

    Phil

  • Any type of field to add Application Profile for the ESG load balancer? (REST API)

    Hello

    I am currently working on adding an application profile to a load on a GSS (edge Service Gateway) balancer. I am using the REST API to add the application profile, here is the functioning of the REST API that I am using.

    POST https://NSX-Manager-IP-Address/api/4.0/edges/edgeId/loadbalancer/config/applicationprofiles

    It works fine, but I can't add a type to the message body. Documentation, it seems there is no field to add the 'type' or the Protocol for the application profile as you can see below,

    < applicationProfile >

    < name > http_application_profile_2 < / name >

    < insertXForwardedFor > true < / insertXForwardedFor >

    < sslPassthrough > true < / sslPassthrough >

    < persistence >

    cookie < method > < / method >

    < cookieName > JSESSIONID < / cookieName >

    Insert < cookieMode > < / cookieMode >

    < / persistence >

    < / applicationProfile >

    Is there a way I can add a type or Protocol to the application profile (that is to say, HTTP, HTTPS, TCP or UDP)? Is there something I'm missing?

    See you soon,.

    Dean

    What is referred to as 'type' in the Web user interface, is actually called 'model' in the API.

    Here is an example of API for the TCP type below

    applicationProfile-3

    testAPI

    fake

    fake

    fake

    The simplest way to understand the API call:

    . Create it on the Web interface

    . Discover the xml do a GET "https://{{nsxmanager}}/api/4.0/edges/edge-xx/loadbalancer/config/applicationprofiles.

    Dimitri

  • Cannot add firewall rules using the REST API vShield App

    Hi all

    I get the following error

    "< errors > < error > < code > 100039 < / code > < description > Unmatched rules found in the configuration." "< / description > < / error > < / errors >.

    When you use the App API vSheild:

    POST https:// /API/2.0/app/firewall/dvportgroup-55/config < vsm-ip >

    Paylod XML:

    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >
    < VshieldAppConfiguration >
    < firewallConfiguration = "dvportgroup-55" the contextId >
    < layer3FirewallRule disabled = "false" priority = "none" id = "1021" >
    < action > allow < / action >
    < connected > false < / connected >
    < source >
    < address >
    < ipAddress > 172.30.68.212 < / ipAddress >
    < / address >
    < > 222 portInfo < / portInfo >
    < / source >
    < destination >
    < address >
    < ipAddress > 172.30.68.166 < / ipAddress >
    < / address >
    < application >
    < > 333 portInfo < / portInfo >
    < Protocol > 6 < / Protocol >
    < / application >
    < / destination >
    < / layer3FirewallRule >
    < / firewallConfiguration >
    < / VshieldAppConfiguration >

    Is anyone has seen this before or any idea why this might be happening?

    In addition, create a wall of fire to provide the variable "id"... How do I know which id to use to create a new firewall rule. I'm using id = "1021" I see one last created after quesrying API... but when you call it through automation, what will the process to define an id invalid?

    Thank you

    xar

    ID must be present, for the new rule Id must be '0' while that for others it should kept as what. The reason for this error which I believe is the same. Replacement of 1021 with 0 should solve this problem. http://blogs.VMware.com/security/2011/11/using-the-VShield-API.html should also be useful to start with vShield firewall App REST API.

    -Kone

  • VRA 6.2 REST API: resource Action with object mapped by VRO

    I created a resource Action (Advanced Services - resources Actions) who calls a workflow orchestrator (VRO) to do a few things.  The VRO workflow takes three objects as inputs: 2 channel and a VC:VirtualMachine.  Connecting the web GUI, when a user selects the action for the specific virtual machine, they are presented with a form asking to specify the content of the 2 strings.  The VC:VirtualMachine object is transparant and (I think) is automatically mapped internally to the enabled virtual machine.  This works very well at the launch through the web GUI.  Now, I need to create the same scenario using the REST API.  I created the "ResourceActionRequest" object JSON and included the 2 strings as indicated in the request data, but I have no idea how to do to add the VC:VirtualMachine object to the request.  I thought maybe it was too transparent, but I get an error if I try to send the JSON without the 3rd data item.  For example, here is my "ResourceActionRequest" object JSON:

    {

    "@type": "ResourceActionRequest",

    'resourceRef': {}

    'id': '< resourceRef-id >.

    },

    'resourceActionRef': {}

    'id': '< resourceActionRef-id >.

    },

    'Organization': {}

    "tenantRef': '< label >."

    "tenantLabel': '< label >."

    'subtenantRef': '< subtenantRef > ',.

    'subtenantLabel': '< subtenantLabel > '.

    },

    "State": "SUBJECT."

    "requestNumber": 0.

    'requestData': {}

    "items": [{}

    "key": "provider-MyFirstCustomProperty."

    'value': {}

    "type": "string",.

    "value': ' blah, blah, blah."

    }

    },

    {

    "key": "provider-MySecondCustomProperty."

    'value': {}

    "type": "string",.

    "value': ' blah, blah, blah."

    }

    }]

    }

    }

    I don't know how to provide the VC:VirtualMachine in the application.  Any help would be appreciated.  Thank you!

    -Stephen

    Hey Stephen,

    I do not see the bits that I expect:

    {

    "key": "provider-MachineName."

    'value': {}

    "type": "string",.

    'value': 'vra045 '.

    }

    }

    It's vRA identity Machine which must correspond to the rear.

    Grant

  • Import an element of configuration via REST API vCO

    Hello, I try to import a configuration item via the REST API of the vCO (5.5.1 device), documented here: http://pubs.vmware.com/vsphere-55/index.jsp?topic=%2Fcom.vmware.vsphere.vco_develop_web_services.doc%2FGUID-75E0F269-3D26-418E-8597-E9FC9E67C608.html

    The doc says thyou must add the request headers to set the properties of the element of the configuration that you want to import, but gives no details.  I tried a few variations but each mistake to return 400 (bad request).  For the purposes of this post, I use vCO as the customer STAYS that way.  I think it can be a problem of chickens and eggs, you have probably set a relationship category (folder) to the imported configuration item configuration item - do not know how to do this, but how otherwise he would know where to store the imported configuration item?

    Here is what I tried:

    // I have pre-defined a REST host on the vCO server that points to itself (var restHost)
    // restHost.url is https://<vco IP>:8281/vco/api
    
    var reqString = restHost.url + "/configurations/";
    System.log("Request Query: " + reqString);
    
    // Got the following content from a REST query to export a config element - this is a vanilla config element
    var xmlContent = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\"?>\n<config-element " +
    // I've tried both omitting and including the id
    //"id=\"CB808080808080808080808080808080038A808001334613384319bad96d0cacb\" +
    "version=\"0.0.0\" >\n" +
    "<display-name><![CDATA[test_element]]></display-name>\n<atts>\n" +
    "</atts>\n</config-element>\n";
    
    var req = restHost.createRequest("POST", reqString);
    req.contentType = "application/vcoobject+xml;charset=UTF-8";
    req.setHeader("contentAsString", xmlContent);
    var response = req.execute();
    System.log("Response: " + response.toSource());
    
    
    

    httpResponse:HTTP / 1.1 400 Bad Request

    Documentation for VMware:

    Make a POST request to the URL of the configuration item objects:

    POST http://{vcoHost}:{port}/vco/api/configurations/

    If the POST request is successful, you receive the 202 status code.

    Not sure if the REST plugin vCO supports several content directly part.

    Do you need to import configuration programmatically items? If this is not the case, the simplest way would be to import the terminal using curl or shell script. Something like the following command:

    curl -i -v -k -u user:password -X POST https://10.23.12.20:8281/vco/api/configurations -F categoryId=8a978c4b46aa6b9a0146aa6d116d0008 -F file=@d:/downloads/abcconfig.vsoconf
    

    where:

    user: password - your credentials of the vCO

    10.23.12.20 - your vCO server address/IP

    8a978c4b46aa6b9a0146aa6d116d0008 - ID of the category of configuration items

    d:/downloads/abcconfig.vsoconf - path to the file containing configuration items to import

  • create the document using the CMIS REST API

    Hello! I would like to integrate my java application with Oracle Webcenter via the REST API of CMIS. I can read, delete documents, but have some problem with creating one.

    I get success only when I create document (type = "/ ucmserver / IDC:GlobalProfile") with the name "idcPrimaryFile". In other cases I have the exception:

    oracle.webcenter.content.integration.RepositoryException: November 12, 2015 08:52:06 oracle.webcenter.content.integration.spi.ucm.DocumentManager mapBinaryPropertiesToTransferFile

    GRAVE: Impossible to perform the action on document with binary because the binary name and the name of the node must be the same, but they are not.  The binary name is XXX and the name of the file is idcPrimaryFile

    My properties:

    Properties =]

    (PropertyIds.OBJECT_TYPE_ID): type.

    (PropertyIds.NAME): name,.

    "/ ucmserver / IDC:GlobalProfile.ora:p:dDocType ':"Application. "

    ' / ucmserver / IDC:GlobalProfile.ora:p:dDocTitle ': 'Test ',.

    ' / ucmserver / IDC:GlobalProfile.ora:p:dSecurityGroup ': 'Public ',.

    ]

    I would appreciate help

    Hello! I solved my problem, but with a workaround.

    I will try to explain the problem and how it is possible to create documents via Oracle Webcenter Content Management API REST CMIS:

    For the next POST request:

    POST/rest/api/cmis/children/ucmserver? UID = IDC:Folder / FLD_USERS & versioningState = none HTTP/1.1

    Host: 192.168.32.192:8888

    User-Agent: Mozilla/5.0 (X 11; Linux x86_64; RV:38.0) Gecko/20100101 Firefox/38.0

    Accept-Encoding: gzip, deflate

    Connection: keep-alive

    Accept-Language: en-US, en; q = 0.5

    Content-Type: application/atom + xml; type = entry

    Cache-Control: no cache

    "http://www.w3.org/2005/Atom' xmlns:cmis ="http://docs.oasis-open.org/ns/cmis/core/200908/"xmlns:cmisra ="http://docs.oasis-open.org/ns/cmis/restatom/200908/"xmlns:chemistry ="http://chemistry.apache.org/">."

    urn: uuid:00000000 - 0000-0000-0000-00000000000

    test

    2015 11-13 T 08: 06:27.014Z

    a text

    Public

    test

    Application

    MyTitle

    / ucmserver / IDC:GlobalProfile

    I get the response from the server

    Error 500 - Internal server error

    oracle.webcenter.content.integration.RepositoryException: 18 November 2015 05:24:04 oracle.webcenter.content.integration.spi.ucm.DocumentManager mapBinaryPropertiesToTransferFile

    GRAVE: Impossible to perform the action on document with binary because the binary name and the name of the node must be the same, but they are not.  The binary name is test , and the name of the file is idcPrimaryFile.

    When the test is the document name.

    This request, I checked with an another compatible services of CMIS (IBM FileNet and OpenCMIS InMemory repository). I created the document with name test it.

    Workaround solution:

    POST request:

    POST/rest/api/cmis/children/ucmserver? UID = IDC:Folder / FLD_USERS & versioningState = none HTTP/1.1

    Host: 192.168.32.192:8888

    User-Agent: Mozilla/5.0 (X 11; Linux x86_64; RV:38.0) Gecko/20100101 Firefox/38.0

    Accept-Encoding: gzip, deflate

    Connection: keep-alive

    Accept-Language: en-US, en; q = 0.5

    Host: 192.168.32.192:8888

    Content-Type: application/atomsvc + xml

    Slug: test

    Cache-Control: no cache

    "http://www.w3.org/2005/Atom' xmlns:cmis ="http://docs.oasis-open.org/ns/cmis/core/200908/"xmlns:cmisra ="http://docs.oasis-open.org/ns/cmis/restatom/200908/"xmlns:chemistry ="http://chemistry.apache.org/">."

    urn: uuid:00000000 - 0000-0000-0000-00000000000

    test

    2015 11-13 T 08: 06:27.014Z

    a text

    Public

    test

    Application

    MyTitle

    / ucmserver / IDC:GlobalProfile

    I created the document with the name test in Oracle Webcenter.

    The differences between applications are:

    Content-Type: application/atomsvc + xml

    Slug: test

    So I'm not sure that the Oracle Webcenter Content Management Service STILL provides "correct" implementation of the OASIS CMIS specification, because I found nothing in therehttp://docs.oasis-open.org/cmis/CMIS/v1.0/cmis-spec-v1.0.html on the Slug query parameter and it is not clear to me how the Oracle Webcenter Content Management REST Service works with Content-type application/atom + xml; type = entry (I mean according to CMIS specification().



    It will be very useful for me to get another point of view. Maybe someone could correct me if I'm wrong.

    Thanks in advance.

  • More quick REST API / JSON approaches to the interviews of the OPA?

    I recognize there are services / libraries that can convert an OPA Web Service deployment on the hub to a JSON / REST API.  (Examples: Mashape I used for the other REMAINS in the SOAP proxy).

    But, is there a consensus on the more common approach / best to this operation?  Is there an approach that may be more in line with the future development of the OPA hub around REST API?  I think I saw something with Oracle Cloud Computing Mobile Service, but I cannot find enough documentation to the CEP with.

    It occurs to me, that instead of researching the topic for an hour or more, I could have benefits more ask on the forum.

    Thank you

    Paul, my quick view is that whatever you do will be OK, because even once we add REST API, existing SOAP API will remain for backward compatibility reasons.

    It would also be impossible to build compatibility for something we have not designed yet, so I can't really all guide on what to do / avoid in order to simplify any possible future transition official rest API.

    Davin.

  • REST API: How to create e-mail/landing page with static/dynamic content?

    With the REST API, it seems that you can create/update the contents of an e-mail or a landing page by specifying html with the type "RawHtmlContent". How it works when this e-mail or a landing page includes a shared or dynamic content? What is the recommended method to create or update an e-mail/landing page and add a new shared or dynamic, content or update the "reference"?

    Unfortunately this is not currently supported by our API.  However, we are building a new point extension called content Cloud that can solve your use case.

Maybe you are looking for