Using PUT, and other APIs in PHP

I can successfully use GET with the REST API, but every time I try to use PUT, I get a 404 error.

This is the error message:

Error Eloqua [404] - (url = > https://secure.eloqua.com/API/REST/1.0/data/contacts/297933) (content_type = > text/html; charset = UTF-8) (http_code = > 404) (header_size = > 218) (request_size = > 220) (filetime = >-1) (ssl_verify_result = > 20) (redirect_count = > 0) (total_time = > 0.380483) (namelookup_time = > 0.047674) (connect_time = > 0.177438) (pretransfer_time = > 0.323525) (size_upload = > 5) (= > 748 size_download) (speed_download = > 1965) (speed_upload = > 13) (download_content_length = >) 748) (upload_content_length = >-1) (starttransfer_time = > 0.38032) (redirect_time = > 0)

When I type the URL (https://secure.eloqua.com/API/REST/1.0/data/contacts/297933) directly in the browser, I see:

Receivera:InternalServiceFaultThe server could not process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (whether from ServiceBehaviorAttribute or < serviceDebug > configuration behavior) on the server in order to send the exception information to the client, or turn on track in accordance with the software Microsoft .NET Framework 3.0 SDK documentation and review the server trace logs.

My $data array looks like this:

$data = array)

'elqSiteID' = > $eloqua-> getSiteId(),.

'Name' = > 'Bob '.

);

$eloqua-> updateById('297933',$data);

Here's where to PUT is called:

$this-> update (' data/contacts /'. $id, $data);

private void update ($url, $data) {}

Return $this-> request ($url, 'PUT', $data);

}

That's what my statement case (inside the demand function):

case "PUT":

curl_setopt ($this-> ch, CURLOPT_CUSTOMREQUEST, 'PUT');

curl_setopt ($this-> ch, CURLOPT_POSTFIELDS, json_encode ($data));

curl_setopt ($this-> ch, CURLOPT_URL., $this-> restApiUrl » /'. $url);

break;

I know that it performs authentication because the GET part work... What I am doing wrong?

Hi ews2001,

I think that thath the cause of the error 400 can be data, based on your code snippet above you send the elqSiteID under contact information and I believe that can cause conflicts.  I suggest to try sending the contact fields only in the data table.

Kind regards

Tags: Marketers

Similar Questions

  • Are automatically shared Contacts with the members of the family of a device for all devices of the family? One device uses IOS9 and others are using IOS10.

    Members of the family can share Contacts?  A member of the family is on IOS9 and others are on IOS10. Our calendars are sharing but not our contacts?

    No, sharing of family does not share Contacts. He shares:

    Purchases

    (If you are registered) Apple's music

    Family Photo album

    Family calendar

    Location sharing

    Find my iPhone

    Apple - iCloud - family sharing

    See you soon,.

    GB

  • [ADF, JDev12.1.3] When you use create/restoreSavepoint... Restore operation is still useful? And other doubts...

    Hallo,

    Dario and Timo advised me (in this thread Re: [ADF, JDev12.1.3] Master w/playback af:form only af:tables detail: how to handle insert and edit through forms?) I make a request using the functions create/restoreSavpoint to this fragment in my application.

    The tables are read-only, and the user can insert and modify records by a form of popup.

    Each table has its own pop-up that I created using a btf executed as diaolog (*).

    Before I open the popup, I create the backup point.

    BindingContext bctx = BindingContext.getCurrent();  
    DCDataControl dcDataControl = bctx.getDefaultDataControl();  
    String sph = (String) dcDataControl.createSavepoint();  
    AdfFacesContext.getCurrentInstance().getPageFlowScope().put("AdfmSavePoint", sph); 
    

    When the popup is closed, I restore the backup point if the Cancel button was clicked...

    Object confirmOrCancel = returnEvent.getReturnValue();  
    if (((String) confirmOrCancel).equals("cancel")) {  
      String sph = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("AdfmSavePoint");  
      BindingContext bctx = BindingContext.getCurrent();  
      DCDataControl dcDataControl = bctx.getDefaultDataControl();  
      dcDataControl.restoreSavepoint(sph);  
    } 
    

    I have these doubts:

    1. the button "CANCEL ALL" (so far) AM restore operation is still meaningful (is always useful) when you use the check points? Or can I avoid using the restore of the AM operation, creating a backup point before you enter the fragment and restore it if the user clicks on "RESTORE ALL"?
    2. for all tables: before opening the popup insert/change the backup point is implemented pageFlowScope under the same key 'AdfmSavePoint '. Is it OK or would it be better to use a different key for each table (for example 'AdfmSavePointTable1', 'AdfmSavePointTable2',...)?
    3. If the pageFlowScope already contains a checkpoint under the "AdfmSavePoint" key... What does if I give the floor to new .put ("AdfmSavePoint", sph)? Can I be sure that the old value is overwritten?
    4. is this safe with nested savepoint? For example in my case I want to create a backup before the fragment in the image point is displayed (and restore if the user leaves the fragment by clicking "RESTORE ALL"), then within the fragment, as I said above, I would manage other points of record when inserting/editing tables.
    5. I noticed that clicking on the button "RESTORE ALL" when it relates to the AM-restore operation causes this strange thing: when before displaying the fragment I call SetCurrentRowWithKey on the master istance VO... If I click on "ROLLBACK ALL" posted master VO Records changes and 1 minutes of the main of the VO table is displayed. Why the master istance VO is not reimain in the folder I've previously selected by SetCurrentRowWithKey?
    6. With reference to the expression (*) above. The BTF 'dialogue' I created contains only the page jspx with shape and a return to activity. I also tried a) create (and restore) the backup point, b) to call createInsert inside the "dialog box" operation BTF (see images below), but the createInsert on retail VO istance called inside the 'dialogue' BTF seems not to reflect on the table as when I call createInsert by calling btf. I have to make some adjustments in the 'dialogue' of BTF?

    Thank you

    Federico

    Federico,

    (1) Yes, what should happen if a user add or edit vo1 and click ok in the dialog box but decided that ask to work must be restored?

    (2) as long as you don't have that a dialog box is open, it should work.

    (3) the flowrate range of page is a map. You can put the same key more than once. If the key already exists, the value is replaced.

    (4) in fact, I don't know, but the sounds of complicated design. I guess you can record more points, but only in the order of creation. It's as if you try to rebuild the framework. BTF yo it even for you, when worn right. Please go to ADF Architecture Square and read and watch it task flow of related things.

    (5) this behavior is as expected. A restore resets all the iterators so thagetto point at the top of he. http://www.Oracle.com/technetwork/Developer-Tools/ADF/learnmore/OCT2010-OTN-Harvest-183714.pdf 'keep the line after cancellation' shows how to handle this situation.

    (6) I suppose have you refresh the table iterator, once you close the dialog box for the new data. But that's only a guess because it depends on how the btf share control of data and the your involved.

    Timo

  • [help] blackberry.audio and other API is not available

    Hi all

    I don't seem to have some API available on my service-config.xml > permision > add, especially the blackberry.audio and the blackberry.audio.player. Ive also noticed that even the blackberry.identity sometimes hide. is it possible to access these APIs (audio and audio.player) on my Wizard of config.xml > permision? Please find below my villas development tools:

    Plugin: Blackberry webworks 2.5.1

    SDK;  Blackberry webworks 1.5.1

    IDE: eclipse helios

    OS: windows 7 32-bit

    Thanks in advance.

    Hi baxberry,

    It's really what you want to use. If you have been happy in eclipse this whole time, there is no reason why you cannot continue to use the editor, but not the WebWorks plugin. I know people using VI, textpad, Eclsipe and everything else under the Sun.

  • Why CC 15 is so difficult to use now and other pet peeves...

    I'm a lot of difficulties drawing the way I used to in Illustrator. When I choose a form, like an eclipse (mostly unfilled a little), there are so many handles and bounding boxes and even when zoomed to 12750% I can hardly move the shape because all these handles are in the way. And zoom in and out constantly just so I can grab and move a form becomes very irritating. Is there a hot key to disable all bounding handles so I can simply move a form?

    And why Adobe continue to add features, while the rest of the application not be improved?  I can write a novel about the things that I would have liked to see improved, as...

    • Navigator sees art outside the boards of art.
    • Lock turn all the functionality.
    • capacity of adjustment of color etc. inside the Illustrator images.
    • image auto pixelation.
    • Divide the shape by number points.
    • more random options (generative art).
    • Possibility to tilt the photos and add gradients.
    • Triangle shape tool for crying out loud.
    • Double click on the label next to the settings button will return by default... like kicking back to 1 point.  Margins of return to 0.
    • Based decimal of further adjustments to the race weight.
    • Hyphenation of text was not the default.
    • Gradually change width of line with the arrow keys. (no need to select the palette of stoke.
    • An edit mode of boards of Art more accessible, it's just but the button on the bar!
    • The type interval jump like you can in flash, in steps.
    • Rotate the perspective grid.  That is, or a better way to align the grid of perspective to a photo, as in photoshop.
    • Forms of Meta, wind, gravity, etc., tools of physics.
    • Needs better tools of computer graphics.
    • perspective and puppet wrap in illustrator.
    • lock centers registration, so I can build characters and animate.
    • button for setting the elements outside of the art Commission.
    • Distort free to have a Preview checkbox.
    • Transformation of each to get a lock for the horiz. Green sliders. %.
    • tool of balls, similar to indesign and muse.

    • Recording of points that put... stay several check points.

    • Panel Recolor responds to / agree to cancel.

    • More advanced options, with control of the blend color.
    • Means more advanced to divide the lines evenly or coefficently.
    • Command-Shift-paste will paste the text without style.
    • Copy and paste in place outside boards of art.
    • Shit key order for export.
    • return the type of animation book tools.
    • being able to convert the refills sold on multiple selections, not one at a time.
    • possibility to change the brush with the help of the Middle sizes, click and drag.
    • best ways to cut and segment shape and shots together.
    • line tool tip that can bend on dragging after the two main points are applied.
    • A much better way to organize brushes and group them for projects as you can in Manga studio.
    • ability to export tables of art in the form of .eps .ai files!
    • possibility to export a test map that shows all the hex colors used in the document.
    • align on the page for the browser panel feature.

    • incorporate images of the save dialogue.

    • A tool like Replicator of Apple's Motion.

    • Library used to be simple and awesome, but now too complex and boring.

    • Preferences to keep the same color selection line.

    • a small button on the manipulator of text box which allows you to remove stray returns the space below.

    • and what happened to feature redefine?... He only desaturates etc on a color not all, even when locked.

    You can ignore the wish list of features.  What I need is a way to disable all handles etc. dressing a form when it is select. I thought that would hide corner Widget, but it is something else. Nevermind, I figured it. You must hold down the command key down to see the shape without all the handle etc.

  • How to access the host using winscp and other application?

    Hello everyone,

    I am running Redhat Enterprise (VM) on a Windows 2003 R2 host computer. Now I would like to access the Redhat Enterprise 5 via WinSCP or other Applications. Also, I need the ability to access Applications running on Redhat (access via Web service) system.

    Is this possible?

    Currently I use the http://hostip:8333 / to access the console remotely. That works very well to set up the customer but for testing Applications that run in the virtual machine is not clear to me (I create Applications at the local level and they--are supposed to--communicate with the client VM, REHL). Someone had some advice for me? If you need more information, let me know!

    Thanks in advance.

    If your guest use in network bridge you can access just as you acceding to any other host.

    If it uses NAT you must forward the appropriate ports (22 for ssh and WinSCP for example) at the prompt by editing the NAT configuration file.

    AWo

    VCP 3 & 4

    Author @ vmwire.net

    \[:o]===\[o:]

    = You want to have this ad as a ringtone on your mobile phone? =

    = Send 'Assignment' to 911 for only $999999,99! =

  • How to make a picture with my webcam to use facebook and other Web sites

    Please tell me how to take pictures with my webcam [toshiba laptop sateliteL755] and keep them to use sites like FACEBOOK, SKYPE soceal media!

    Contact support staff who made the webcam.

  • UK keyboard - how to use characters and Portuguese accents?

    I just moved to the United Kingdom and bought a computer here. Obviously, the ti came with a UK keyboard. But I often need to write in Portuguese and need to use accents and other characters for which there is no letters on the keyboard.

    I know that I can always use the character map to copy and paste these characters, but it is very inconvenient to write a large text in this way, not to mention the counter productive because it completely breaks the workflow.

    I know that I can also install files and use the keyboard as Oortuguese (Brazilian ABNT or ABNTII) but then I meet similar workflow problems given that the keys will not match what they actually type and will take time to get adjusted so be it.

    Is it possible to do just the keyboard write in a foreign language as well and still write in English and Portuguese, without problems?

    I had a similar problem - computer bought in England but used mainly in Switzerland. I put the keyboard to be "French of Switzerland" that gives me access to diacritics, I need to write in French and in German (and because I learned to touch type here). To put the keyboard to another language go to control panel and choose keyboard. The process is a bit messy, but it does not work OK. Everything else remains in English (interface OS, menus and so on).

    The problem of course with this method is that what you see on the keyboard does not match what you see on the screen (the keyboard Switzerland is not too bad, about 90% of the keys are the same as a UK keyboard). If you touch type, which is not a real problem. If this is a problem, then you can consider using a separate Portuguese external keyboard. I've also seen people put little stickers on keys (if they tend to fade pretty quickly!)

  • How can I put a cc photography plan to a comprehensive plan so I can use first and After Effects and other applications as well?

    How can I put a cc photography (Photoshop & Lightroom only) plan to a comprehensive plan so I can use first and After Effects and other applications as well?

    See to manage your membership and your payment. Cloud Creative

    'Change for an annual membership or membership full creative cloud'

  • My Mozilla Firefox browser does not open 4.5 sites that I use the most. That is, among other things, Gmail, Facebook, LinkedIn and other 2. I have re installed twice and got

    My Mozilla Firefox browser does not open 4.5 sites that I use the most. That is, among other things, Gmail, Facebook, LinkedIn and other 2. I have re installed twice and got a version update, but the problem is still there. Please help me, I am so worry not.

    Thank you.

    Shakeel.

    See:

    You can try to reset (power off / on) of the router.

    Do a check with some malware malware, analysis of programs on the Windows computer.

    You need to scan with all programs, because each program detects a different malicious program.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • I use FrostWire and the other asked me to update, so I did and came up with this message, 'FrostWire can damage your computer. You must eject the disk image.

    Hello...

    I wonder if you can help me with a problem with my desktop OS X El Capitan 10.11.4 various...

    I use FrostWire and the other asked me to update, so I did and came up with this message, 'FrostWire can damage your computer. You must eject the disk image. There is no disk in my hard drive... I try to download again, but still the same message...

    Help, please...

    Much thanks

    Lisa

    < re-titled by host >

    The actual message means you need to move the mounted image - the small icon that is displayed after you double-click the .dmg - and put it in the trash.

    Where do you see the message your computer?

  • my browser cannot open google and facebook and other https sites that it does not open even the app store does not work, I tried to change my DNS google DNS and disable IPv6 but still no use, help PLZ!

    my browser cannot open google and facebook and other https sites that it does not open even the app store does not work, I tried to change my DNS google DNS and disable IPv6 but still no use, help PLZ!

    You may have installed one or more variants of the malware "VSearch' ad-injection. Please back up all data, and then take the steps below to disable it.

    Do not use any type of product, "anti-virus" or "anti-malware" on a Mac. It is never necessary for her, and relying on it for protection makes you more vulnerable to attacks, not less.

    Malware is constantly evolving to work around defenses against it. This procedure works now, I know. It will not work in the future. Anyone finding this comment a couple of days or more after it was published should look for a more recent discussion, or start a new one.

    Step 1

    VSearch malware tries to hide by varying names of the files it installs. It regenerates itself also if you try to remove it when it is run. To remove it, you must first start in safe mode temporarily disable the malware.

    Note: If FileVault is enabled in OS X 10.9 or an earlier version, or if a firmware password is defined, or if the boot volume is a software RAID, you can not do this. Ask for other instructions.

    Step 2

    When running in safe mode, load the web page and then triple - click on the line below to select. Copy the text to the Clipboard by pressing Control-C key combination:

    /Library/LaunchDaemons

    In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + V. You won't see what you pasted a newline being included. Press return.

    A folder named "LaunchDaemons" can open. If this is the case, press the combination of keys command-2 to select the display of the list, if it is not already selected.

    There should be a column in the update Finder window. Click this title two times to sort the content by date with the most recent at the top. Please don't skip this step. Files that belong to an instance of VSearch will have the same date of change for a few minutes, then they will be grouped together when you sort the folder this way, which makes them easy to identify.

    Step 3

    In the LaunchDaemons folder, there may be one or more files with the name of this form:

    com Apple.something.plist

    When something is a random string, without the letters, different in each case.

    Note that the name consists of four words separated by dots. Typical examples are:

    com Apple.builins.plist

    com Apple.cereng.plist

    com Apple.nysgar.plist

    There may be one or more items with a name of the form:

    com.something.plist

    Yet once something is a random string, without meaning - not necessarily the same as that which appears in one of the other file names.

    These names consist of three words separated by dots. Typical examples are:

    com.semifasciaUpd.plist

    com.ubuiling.plist

    Sometimes there are items (usually not more than one) with the name of this form:

    com.something .net - preferences.plist

    This name consists of four words (the third hyphen) separated by periods. Typical example:

    com.jangly .net - preferences.plist

    Drag all items in the basket. You may be prompted for administrator login password.

    Restart the computer and empty the trash.

    Examples of legitimate files located in the same folder:

    com.apple.FinalCutServer.fcsvr_ldsd.plist

    com Apple.Installer.osmessagetracing.plist

    com Apple.Qmaster.qmasterd.plist

    com Apple.aelwriter.plist

    com Apple.SERVERD.plist

    com Tether.plist

    The first three are clearly not VSearch files because the names do not match the above models. The last three are not easy to distinguish by the name alone, but the modification date will be earlier than the date at which VSearch has been installed, perhaps several years. None of these files will be present in most installations of Mac OS X.

    Do not delete the folder 'LaunchDaemons' or anything else inside, unless you know you have another type of unwanted software and more VSearch. The file is a normal part of Mac OS X. The "demon" refers to a program that starts automatically. This is not inherently bad, but the mechanism is sometimes exploited by hackers for malicious software.

    If you are not sure whether a file is part of the malware, order the contents of the folder by date modified I wrote in step 2, no name. Malicious files will be grouped together. There could be more than one such group, if you attacked more than once. A file dated far in the past is not part of the malware. A folder in date dated Middle an obviously malicious cluster is almost certainly too malicious.

    If the files come back after you remove the, they are replaced by others with similar names, then either you didn't start in safe mode or you do not have all the. Return to step 1 and try again.

    Step 4

    Reset the home page in each of your browsers, if it has been modified. In Safari, first load the desired home page, then select

    ▹ Safari preferences... ▹ General

    and click on

    Set on the current Page

    If you use Firefox or Chrome web browser, remove the extensions or add-ons that you don't know that you need. When in doubt, remove all of them.

    The malware is now permanently inactivated, as long as you reinstall it never. A few small files will be left behind, but they have no effect, and trying to find all them is more trouble that it's worth.

    Step 5

    The malware lets the web proxy discovery in the network settings. If you know that the setting was already enabled for a reason, skip this step. Otherwise, you should undo the change.

    Open the network pane in system preferences. If there is a padlock icon in the lower left corner of the window, click it and authenticate to unlock the settings. Click the Advanced button, and then select Proxies in the sheet that drops down. Uncheck that Auto Discovery Proxy if it is checked. Click OK, and then apply.

    Step 6

    This step is optional. Open the users and groups in the system preferences and click on the lock icon to unlock the settings. In the list of users, there may be some with random names that have been added by the malware. You can remove these users. If you are not sure whether a user is legitimate, do not delete it.

  • How can I get firefox without using the heel. I just want to download once and use it on other computers

    I don't want to download the latest version of Firefox more than once. I want to download it and put my other computers. I have a limited download quota.

    The full Offline Installer is here:
    http://www.Mozilla.com/en-us/Firefox/all.html

  • Java has been blocked because of the threat, I did the update, and other options to reactivate it ie.manual update reinstalls still websites like YouTube always used to load up. Works great in Chrome &amp; IE!

    Java has been blocked because of the threat, I did the update, and other options to reactivate it ie.manual update reinstalls still websites like YouTube always used to load up. Works great in Chrome & IE!

    Your list of plugins in "Details of the system more" Watch 1.6.0_31 of next generation Java plug-in for browsers Mozilla for Java should not be blocked.

    Could you post a link to a Web page where Java does not work for you? YouTube uses the Flash, not Java. Here is a list of the test pages of Java that you can try to verify that Java works, of http://kb.mozillazine.org/Java#Testing_Java

    Moreover, I see in your list of plugins you also the VLC media player Plugin Web 2.0.0 so, it is possible that the VLC plugin is causing a conflict if YouTube or other videos do not work. See Fix common audio and graphics problems (you may have to disable the VLC Media Player plugin in the Add-ons-> list of Plugins for some media to play).

  • Open with options: I want to add a new application to the list right click on file-&gt; open with and rearrange the list so my search app is first. I know that I can use open with-&gt; other and select any application, but it takes too much time since I u

    I want to add a new application to the list right click on file-> open with

    and also reorder the list so my search app is first / top of the list.

    I know that I can use open with-> other and select any application, but it takes too long I should use my intended application in this way several times a day.

    Basically, I'm looking for a configurable way configure open with, something more to send to Windows.

    Thank you very much for all the advice offered.

    The operating system, not you, not control that open with the menu command.

Maybe you are looking for

  • Upgrade a MBP 2011 end, 13 "with a ssd

    I think of upgrading my MacBook Pro 8.1 end 2011, 13 "by replacing the hd with an ssd. I have an external hard drive now run with time machine, so I think I have a good back up. I would appreciate any comments about what is available: manufacturers a

  • Firefox crashes when opening and the same thing in safe mode

    We're sorry Firefox has been a problem and crashed. We will try to restore your tabs and windows when it restarts. To help us diagnose and fix the problem, you can send us a crash report.

  • Ethernet connection problems

    I just bought a Tablet from Lenovo TAB 2 10 - 30 and found that I can not get connected to the Internet because of problems with the power of the signal from my router. I have been using a PC for the year that I connect to the same router via an Ethe

  • E1505 dysfunction media buttons. Some work, others do not.

    I hope that at least someone can help me find a cause for it. Today I was running an update of iTunes, version 7.6.2, and after installing it, I realized that some media buttons located on the front of the machine under the synaptic touchpad were fun

  • Help of blackBerry Smartphones, my phone is going to explode?

    Hi all! I have a BB Curve 8520, who has been in and out of repair due to the WSOD (I'll spare you the details). I am learning now that my battery is swollen (that I got back from repair anyway - even if the repair report says that the battery is fine