REST API: attribute converted

I use the REST API to access emails, and I found that the converted attribute is not readable in a time string. Could someone tell me how to convert it into a time warp?
An example is converted":"1410076908 ". How to convert this number strng in one hour?

The time stamp is provided in the format of the time.  Please see this page for info on this format of time stamp: http://www.epochconverter.com

Tags: Marketers

Similar Questions

  • 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);

  • JSON REST API format

    Hi all

    I want to read a specific attribute of my assets using the REST API and I would like this information in JSON, but I don't know how to do to get the attribute first, I used http://localhost:9080 / cs/REST/sites/mysite/types/BasicContent_C/assets/1374098078620 / , but the API returns the entire RESOURCE as XML, is it possible to return a single attribute? and it is possible to return this information in JSON format? or I need to read the information together and look for the attribute I want show?

    I want to show information about an external jsp page, I mean the other application.

    Best regards.

    Hello rvillamarin,

    I'm sorry but I needed the same two months ago and I have not found the way.

    Answer your questions, in my opinion:

    is it possible to return a single attribute? N ° you must retrieve the whole XML and look for the attribute on it.

    and it is possible to return this information in JSON? No. two options: create a model in WCSites in order to recover the attributes and present a JSON or create an intermediate java class to convert XML to JSON.

    or I need to read the information together and search for the attribute I want to show? So you can not do directly in the call of REST, you need to develop something.

    What we have done is to process the XML once we received in the client.

    It will be useful,

    Gerardo

  • 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 - the field value date Contact exported in digital format.

    Hi people,

    I used below REST API to retrieve the Contacts with the views and custom filter.

    The JSON response, I shot the date value in the number format. As 'C_Lead_Score_Date': '1434456862',


    https://secure.Eloqua.com/API/rest/1.0/data/contact/view/ {identifier} / contacts/filter / {id}


    How can I convert the appropriate number in date value? or y at - it an adjustment to the level of the code to retrieve the value in the correct date format.


    The data type of the field is dates.

    The date is returned to as a Unix timestamp.

    You can use an online converter to convert it to a normal value, for example: online - time conversion Conversion Unix

    1434456862 = Tuesday, June 16, 2015 12:14:22 GMT

  • Quesiton answer REST API

    I'm trying to understand what information is contained in the Eloqua activities for the activityTypes object. Activities has these attributes:

    -ID

    -type

    -activityDate

    -activityType

    -assetID

    -contactID

    -Details

    By the documentation, the different activityTypes include emalClickThrough emailSend emailOpen, webVisit, campaignMembership... etc.

    What I've not seen so far, this is what Details would be available for each of these categories. The link below provides an example of output that would be for a emailSend:

    http://topliners.Eloqua.com/docs/doc-3092

    Of course, "Subject line" not will be not rendered for webVisit and CampaignMembership... but what would? We are in the design phase of a project and rely on documentation to illustrate attributes are available for export in a data warehouse.  Please point me to the documentation where I can find this level of information.

    Thank you!

    Hi Joseph,.

    We have updated the original document (REST API - access Contact activities) to include the details for each type of activity.

    Included here for convenience:

    Types of activities (Details)

    • campaignMembership

      • Replied
      • CampaignName
      • LeadStage
    • emailClickThrough
      • EmailClickedThruLink
      • EmailName
      • EmailWebLink
      • EmailRecipientId
      • SubjectLine
    • emailOpen
      • EmailName
      • EmailWebLink
      • EmailRecipientId
      • IPAddress
      • SubjectLine
    • emailSend
      • EmailName
      • EmailWebLink
      • EmailRecipientId
      • SubjectLine
    • emailSubscribe
      • CampaignName
      • EmailCampaignId
    • emailUnsubscribe
      • CampaignName
      • EmailCampaignId
    • formSubmit
      • Collection
      • FormName
    • webVisit
      • Duration
      • QueryString
      • QueryStringDisplay
      • Thread

    Please let me know if you need more information.

    Thank you

    Fred

  • Get the emails in descending order of creation date. [REST API]

    Hello I am trying to GET emaiils of the REST API in order descending creation date. So far, my URL params look like:

    emails/assets /? Search = * BN * & page = 1 & number = 50 & depth minimum = & orderBy = converted

    This seems to put in ascending order. I wonder if I can specify the order? I noticed for the contacts there is a sorting = {sortOn} & dir = desc, so is it possible

    to do with e-mails? I tried to join the above URL & dir = desc but not luck and assuming that he only is not supported from this page http://topliners.eloqua.com/docs/DOC-3083.

    Yes I can reverse my logic in the program from the end of emails received, but I wonder if I can simply specify order emails using the REST API?

    Please let me know and thank you.

    Hi John,.

    To sort by a column name, such as the 'name' field, you can simply add the following query string parameters: & orderBy = name % 20desc

    The sort directions are: asc | / / DESC

    We will share a post soon to describe how to do this. The API should support the "dir" query string argument, but it doesn't seem to work. We will look into it as well.

    Hope this helps,

    Fred

  • Sorting of emails [REST API] [PHP]

    Hello, I am trying to sort emails by using URL parameters. I am trying to sort the messages by date of creation, or in any case that would have the most recently created e-mail first and in descending order.

    So far, I have https://secure.eloqua.com/API/REST/1.0/assets/emails?search= * SNL * & page = 1 & number = 50 & depth minimum = & spell = converted & dir = desc

    The & sort = converted & dir = desc settings seem to do absolutely nothing.

    I think that converted is a timestamp because updatedAt resembling a timestamp as well, but this is perhaps the place where it was created. Maybe even sorting by ID would be a good thing because

    I think that id autoincrements. So more the ID, the most recent of the email, but this assumption may fail in some cases. I tried & sort = id & dir = desc and which does not change the order as well.

    So what are the properties can I sort through emails? Any ideas on how to sort to have emails more recently created first and in descending order?

    I also use an instance of E9.

    Hi John,.

    You can use the following query parameters when you search Emails using the REST API:

    • GET/assets/emails? depth = {depth} & count = {number} & page = {page} & search = {search} & orderBy = {orderBy} & lastUpdatedAt = {lastUpdatedAt}

    The document following (to access emails using the REST API) described the available properties on the object of the contract. To retrieve the most recent, you can order in "updatedAt.

    I hope this helps.

    Thank you

    Fred

  • There the rest APIs to retrieve the metadata for entity for eloqua objects?

    There is a list of all the objects that are accessible by the REST for CRUD in this link: REST API - Documentation for kernel objects in the objects of the core section.

    For each of the objects listed in the objects of the core section are there is a metadata field in the Properties section.

    For example, for the purpose of the e-mail message, The REST API - to access Emails , under the Properties section, there entered corresponding to the fields of the object of the emails under the
    Name, Type, Description and validation topics.

    Is there a REST API to retrieve the same information, i.e. metadata field for an object programmatically eloqua?
    Otherwise, this is a serious obstacle to building systems that are the metadata engine and support for SOAP is removed...

    The closest to what you are looking for would be endpoints of assistance for a description of the fields. Example of /api/bulk/1.0/contact/fields

    {

    "items": [{}

    'name': "E-mail address",

    "internalName": "C_EmailAddress",

    'dataType': 'emailAddress;

    'hasReadOnlyConstraint': false,

    'hasNotNullConstraint': false,

    'hasUniquenessConstraint': true,

    'Déclaration': '{{Contact.Field (C_EmailAddress)}}.

    "uri": "/ contact/field/100001",

    "converted': ' / Date (-2208970800000) /"

    'updatedAt': ' / Date (-2208970800000) / ".

    },

    {

    'name': "First name",

    "internalName": "C_FirstName",

    'dataType': "string",.

    'hasReadOnlyConstraint': false,

    'hasNotNullConstraint': false,

    'hasUniquenessConstraint': false,

    'Déclaration': '{{Contact.Field (C_FirstName)}}.

    "uri": "/ contact/field/100002."

    "converted': ' / Date (-2208970800000) /"

    "updatedBy": "MgrzzzOracleCloudSupportP01E10",

    'updatedAt': ' / Date (1408993722380) / ".

    },.....

    If so, it will also include an element "defaultValue". How many characters you can store in a field (precision) is documented here: Type of data (data and Digital Formats). The same endpoint exist in bulk 2.0, and there are variants for the account fields and Objetpersonnalise. Another exists in the REST through Api/rest/2.0/assets/contact/fields?depth=complete... It does not include the declaration of ML, but there other useful information such as the type of default update and a flag 'isAccountLinkageField '.

    Similarly, if you describe a form via SOAP or REST, it also will give you the fields and their type.

    Kind regards

    Bojan

  • 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!

  • REST API assignRolePermissionToUserGroup

    Im trying to update the objects of our clients have right of in vROps, programmatically through the REST API. The idea is that when a customer starts rotating or destroyed a virtual computer through vRA, we would find all of their machines virtual provisioned and rebuild the list of objects for their group of vROps through vRO using the REST API of vROps. I have a vRO workflow that looks like this:

    var groupId = "8c380090-d5c3-42a7-a77c-5de4437ce85b"
    var resourceId = "8e62002f-0965-47e2-a82a-6d403b44b756"
    
    var body = {"traversal-spec-instances" : [{
      "traversal-spec-instance" : {
           "selectAllResources" : false,
           "name" : "vSphere Hosts and Clusters",
           "resourceKind" : "vSphere World",
           "adapterKind" : "VMWARE",
           "resourceSelection" : [{
                "resourceId" : [
                     resourceId,
                     "4abb32e5-1fd0-443b-85ed-4995da4a1a0d"
                ],
                "type" : "SPECIFIC"
           }]
      }
    }],
    "allowAllObjects" : false,
    "roleName" : "ReadOnly"
    }
    System.log(JSON.stringify(body));
    
    
    var request = restHost.createRequest("PUT", "/auth/usergroups/" + groupId + "/permissions", body);
    request.contentType = "application/json";
    
    
    var json = JSON.stringify(System.getModule("com.vmware.library.http-rest").xml2json(request.execute().contentAsString));
    System.log(json);
    
    
    

    Which produces the string JSON:

    {"traversal-spec-instances":[{"traversal-spec-instance":{"selectAllResources":false,"name":"vSphere Hosts and Clusters","resourceKind":"vSphere World","adapterKind":"VMWARE","resourceSelection":[{"resourceId":["8e62002f-0965-47e2-a82a-6d403b44b756","4abb32e5-1fd0-443b-85ed-4995da4a1a0d"],"type":"SPECIFIC"}]}}],"allowAllObjects":false,"roleName":"ReadOnly"}
    
    
    

    There are no examples of the request body then I'm just doing what I interpret requires that the documentation of the REST API.

    Run this generates the error:

    {"error":{"message":"Invalid input format.","xmlns:ops":"http://webservice.vmware.com/vRealizeOpsMgr/1.0/","moreInformation":{"info":{"content":"/suite-api/api/auth/usergroups/8c380090-d5c3-42a7-a77c-5de4437ce85b/permissions","name":"api-uri"}},"httpStatusCode":400,"xmlns:xs":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","apiErrorCode":400}}
    
    
    

    Which is not very useful.

    I checked with other API calls that the groupId is correct and returns a grump object valid through the REST API. So my assumption at this point is that the body of the request is malformed but I'm not sure how and errors are not giving me much to go.

    You're right about the resourceKind.  I did some tests and the JSON body below worked for me.  I changed two things:

    1. I converted the body to a string variable.  It seemed that it was sent as an object.
    2. I removed the "path-spec-instance", while the instance is just placed between braces inside the "crossing-spec-proceedings".  I did a get on a sample group and that's how it was formatted.
    var body = {"traversal-spec-instances" : [{  
    
           "selectAllResources" : false,
           "name" : "vSphere Hosts and Clusters",
           "resourceKind" : "vSphere World",
           "adapterKind" : "VMWARE",
           "resourceSelection" : [{
                "resourceId" : [
                     resourceId,
                     "414f5fdc-a651-4886-adb7-5d947c69ae63"
                ],
                "type" : "SPECIFIC"
           }]  
    
    }],
    "allowAllObjects" : false,
    "roleName" : "ReadOnly"
    }
    System.log(JSON.stringify(body));
    System.log(typeof body);
    var stringBody = JSON.stringify(body);  
    
    var request = restHost.createRequest("PUT", "/auth/usergroups/" + groupId + "/permissions", stringBody);
    request.contentType = "application/json";
    
  • REST API: Assets in Flex updated

    We are trying to update some of the attributes in the assets of Flex using the REST api.

    However when we post the update of the application, Server CS began mandatory reporting are not provided.

    Question: Do we need to DISPLAY all the attributes that are required, even if we just want to update a field?

    Do we need to retrieve all of the required fields first and post them agin? What is the best way to update one of the attributes?

    We are running on 11.1.1.6.1

    [2014-05-14 15:19:50, 447 EDT] [DEBUG] [o - 169.113.108.89 - 7211-exec-626] [com.fatwire.rest.time] complete POST on: http://host/CS/rest/sites/xxx/types/xxxxxx/assets/1320477860438; Of the query parameters: {ticket = [ST-1278-B1c9OpwQvtgk16AqkcZy-number-1]}; Time: 32 m

    [2014-05-14 15:19:50, 447 EDT] [DEBUG] [o 169.113.108.89 - 7211-exec-626] [fatwire.rest.resources.BaseExceptionMapper] attribute AttributeName is required for AssetType XXXXXXX and cannot be null

    com.fatwire.rest.ServiceException: attribute ATTRIBUTE_NAME is mandatory for AssetType XXXXXX and cannot be null

    at com.fatwire.rest.service.impl.LocalAssetService.updateAsset(LocalAssetService.java:505)

    at com.fatwire.rest.service.impl.LocalAssetService.updateAsset(LocalAssetService.java:466)

    at com.fatwire.rest.resources.SiteTypeAssetResource.updateAsset(SiteTypeAssetResource.java:134)

    at sun.reflect.GeneratedMethodAccessor545.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    to com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ ResponseOutInvoker._dispatch (AbstractResourceMethodDispatchProvider.java:175)

    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)

    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:208)

    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:75)

    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:115)

    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:67)

    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:775)

    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:740)

    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:731)

    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:372)

    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:452)

    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:633)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.fatwire.auth.RequestAuthenticationFilter.doFilter(RequestAuthenticationFilter.java:192)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at com.fatwire.wem.sso.cas.filter.CASFilter.doFilter(CASFilter.java:602)

    at com.fatwire.wem.sso.SSOFilter.doFilter(SSOFilter.java:51)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:205)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

    at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:193)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:589)

    to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:312)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:615)

    at java.lang.Thread.run(Thread.java:744)

    Caused by: com.fatwire.assetapi.common.AssetAccessException: attribute AttributeName is required for AssetType XXXXXX and cannot be null

    at com.fatwire.assetapi.data.FlexAssetDataWriteStrategy._populateAttributes(FlexAssetDataWriteStrategy.java:207)

    at com.fatwire.assetapi.data.FlexAssetDataWriteStrategy.getInstance(FlexAssetDataWriteStrategy.java:56)

    at com.fatwire.assetapi.data.BasicAssetDataWriteStrategy.getInstances(BasicAssetDataWriteStrategy.java:334)

    at com.fatwire.assetapi.data.FlexAssetDataWriteStrategy.write(FlexAssetDataWriteStrategy.java:44)

    at com.fatwire.assetapi.data.AssetDataManagerImpl.update(AssetDataManagerImpl.java:255)

    at com.fatwire.assetapi.data.AssetDataManagerImpl.update(AssetDataManagerImpl.java:233)

    at com.fatwire.rest.service.impl.LocalAssetService.updateAsset(LocalAssetService.java:501)

    ... more than 41

    Hi Sarath.Dontireddy,

    Even if you just want to update a field, you must collect all and post them later. Otherwise, those that you do not fill will be empty and updated, with the impact on the required fields as the can not be null, so that you get the trace of the error as the attribute a name.

    Kind regards

    Enrique

  • Workflow of vCO of query using the REST API in PowerShell

    Hello

    I am interrogating a workflow vCO by name using the REST API of PowerShell based on this article:

    http://www.vcoteam.info/articles/learn-VCO/268-how-to-use-the-rest-API-to-start-a-workflow.html

    $username = "XXXXXX".

    $upassword = "XXXXXX".

    $auth = $username + ':' + $upassword

    $Encoded = [System.Text.Encoding]: UTF8. GetBytes ($auth)

    $EncodedPassword = [System.Convert]: ToBase64String ($Encoded)

    $headers = @{' authorization '=' basic $($EncodedPassword) ' ;}}

    $body = "<-xmlns = execution context" ". ' http://www.VMware.com/VCO ' > < / execution context > '

    #query for workflow named "donothing".

    Invoke-RestMethod-uri https://XXXX:8281/api/flow /? conditions = name = donothing -Headers $headers - body $body - ContentType "application/xml" - Get method

    Invoke RestMethod: failed to send a content-body with this type of verb.

    On line: 1 char: 1

    + Call-RestMethod-uri https://XXXX:8281/api/flow /? conditions = name = donoth ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo: NotSpecified: (:)) [invoking-RestMethod], ProtocolViolationException)

    + FullyQualifiedErrorId: System.Net.ProtocolViolationException, Microsoft.PowerShell.Commands.InvokeRestMethodCommand

    The request succeeds by using the customer REMAINS on Firefox, but I can't make it work on PowerShell. (NOTE: PowerShell workflow execution works very well)

    Any help is appreciated.

    Thank you

    Juan.

    OK, I managed to do work by removing

    [System.Net.ServicePointManager]: ServerCertificateValidationCallback = {$true}

    And add this at the beginning of the script

    "Add-type @ '.

    using System.Net;

    using System.Security.Cryptography.X509Certificates;

    public class TrustAllCertsPolicy: {ICertificatePolicy

    public bool CheckValidationResult)

    ServicePoint srvPoint, X509Certificate certificate,

    WebRequest request, int certificateProblem) {}

    Returns true;

    }

    }

    "@

    [System.Net.ServicePointManager]: CertificatePolicy = New-Object TrustAllCertsPolicy

    Now I can use the GET method:

    $ret = Invoke-WebRequest - uri $URL - Headers $headers - ContentType "application/xml" - Get method

    I spent to Invoke-WebRequest so I can get the return of application Web.

    Juan.

  • C#, UCCX, Rest API, PUT (update a resource) and not taken media Type supported

    Hi, I'm developing an application to update the skills of resources with the REST API.

    I can get all the values I want to (GET), but when I try to update a resource using PUT, and then I get a "415 Unsupported Media Type" webException.

    I discovered that c# / UCCX works with demand. MediaType (instead of request. ContentType).

    I got this error when I tried to GET the data. He now works for the GET.

    But to PUT it, I got the error. Method is defined as SAID, MediaType = "application/xml".

    I tried to empty, ' text/xml '...

    Looked on the internet, Web sites, saying always specify ContentType/MediaType = "application/xml", I have already done.

    I also got the same error if I try an application COULD and without sending data.

    Thanks for your help!

    public string MakeRequest()
    {
    var request = (HttpWebRequest) WebRequest.Create (EndPoint);
    request. Credentials = new System.Net.NetworkCredential (login, password);
    request. Method = Method.ToString ();
    request. ContentLength = 0;
    request. Accept = ContentType;
    request. MediaType = ContentType;
                
    #region so PUT
    If (! string.) IsNullOrEmpty (PostData) & method == HttpVerb.PUT)
    {
    encoding of var = new UTF8Encoding();
    PostData = PostData.Replace ("\n", "");
    var bytes = Encoding.UTF8.GetBytes (PostData);
    request. ContentLength = bytes. Length;
                    
    using (var writeStream = request. GetRequestStream())
    {
    writeStream.Write (bytes, 0, bytes.) (Length);
    }
    }
    #endregion

    Try
    {
    assistance (response var = (HttpWebResponse) request. GetResponse())
    {
    var responseValue = string. Empty;

    If (answer. StatusCode! = HttpStatusCode.OK)
    {
    var message = String.Format ("request failed. Received HTTP {0}", response. StatusCode);
    throw new ApplicationException (message);
    }

    Enter the answer
    using (var responseStream = response. GetResponseStream())
    {
    If (responseStream! = null)
    using (var = new StreamReader (responseStream) Player)
    {
    responseValue = reader. ReadToEnd();
    }
    }

    Return responseValue;
    }
    }
    catch (WebException wex)
    {
    error string = wex. Message;
    Return ' ';
    }

    OK you got, in this case, post your request in the Sub forum as well which is sought after by developers and you can you expect a concrete answer/explanation on the same

    https://communities.Cisco.com/community/Developer/Express-configuration-API

    Concerning

    Deepak

  • CPO 3.0 call a REST API

    I try to call a remote REST API that returns a JSON object.

    The call browser API looks like this

    http://IPAM-dev/phpipam/API/?app_id=API&controller=sections&action=read&ID=6

    Returns

    {'success': true, 'data': {'id': '6', 'name': "Telford subnets", 'description': '',' masterSection': '0', 'permissions': "{\"4\":\"1\ ""} strictMode ',' ': '1', 'subnetOrdering': null, 'order': null, "editDate": null, "showVLAN": '0', 'showVRF': '0' "}}

    When I try to use the OPC Web HTTP Request activity it fails with the following error

    Unable to send a content-body with this type of verb.

    I think the problem here is the content type. The default is application/xml; charset = utf - 8 in the activity, I tried to change this text, html and json, but still did not work. I can't let the emty content type in the activity.

    Anyone have any suggestion how to make a REST of CPO call using the activity Web HTTP request

    Try to change GET to POST (in the form of CALL-CPO_REST - RQ.png).  Sends the contents of the body generally requires a POST not a GET.

Maybe you are looking for

  • Synchronization with single device synchronization server

    Hello This must be a FAQ, but I'm not, so this is. How can I sync data from the server for synchronization to Mozilla to one device? The context is that I am currently running Ubuntu Linux USB on my computer at home, because the boot on this computer

  • Sound does not work on HDMI on Qosmio G30-153

    I have a beautiful picture but no sound when G30-153 HDMI cable is connected to the LCD TV.Sound comes only from the G30.

  • Flashing monitor

    The power button on my Dell monitor started blinking on and outside, with no visible image, except a brief flash of light. I am running Windows XP and I use service pack 2. (I had a bad experience, installation of other service packs, so I am wary of

  • Some icons on the start menu are missing after a remote desktop session in Windows 7

    I use Win7 Pro SP1 and whenever I come back to my office after finishing a session desktop connection to my computer remotely, I noticed several of the icons in the all programs from the Start Menu section changed to default page icons. If I try to o

  • Image Windows 7 Enterprise backup error 0 x 80780119

    I am running Windows 7 Enterprise x 64 and try to run a backup to help to create a system image utility.  I have one physical drive partitioned into a 50 GB system partition and a 100 GB data partition.  There is also the system reserved 100 MB parti