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).

Tags: VMware

Similar Questions

  • Can not do a query with the REST api

    Hello

    After discovering that the use of the standard SOAP API what is like poking yourself in the eye with a sharp stick, I try to use the REST API. At first, I tried to exercise it through the extension of POSTMAN on Chrome. But I have no joy.

    Can I use caller ID to get the URL, so I know that my authentication is OK. But all other calls give me:

    Failure of 403 XSRF Protection


    Is an example of a call, that I'm trying:

    https://secure.Eloqua.com/API/rest/1.0/data/[email protected] & Count = 1

    I can't find any reference anywhere to this error 403.

    Help!

    Thank you

    Simon

    Hi Simon,.

    Looks like you're client (web browser) might have stored credentials for Eloqua, probably in the cookies collection. If you try to delete your cookies and rerun the query API with basic authentication, it should work.

    Hope this helps and please let us know if you need more information.

    Thank you

    Fred

  • Get complete information of Contact with the REST API with Ruby

    Hello

    I'm trying to find information from a contact using the REST API from Ruby. I followed the example posted here and I was able to get good contact with Eloqua, but information are the basis and the FieldValues table is very long with fieldValues can only be and no label field.

    I don't know I asked for complete = depth, and I verified that the contact even on the side of Eloqua seen so many other areas.

    It's the URL that I use: https://secure.eloqua.com/API/REST/1.0/data/contacts?search= < emailAddress > & depth = full & count = 1

    and I don't get like this field in the fieldValues can only be: {'type': 'FieldValue', 'id': "100175"}

    With respect to the main information, they are basic.

    Is it possible to obtain all the contact fields, the same than the one I see on the site of Eloqua?

    Thank you

    Hi Theyaa,

    You can use the following endpoint to retrieve a list of all fields with their unique identifier and metadata:

    • GET /API/REST/1.0/assets/contact/fields?depth=complete&search=*&page=1&count=250

    Hope this helps and please let me know if you need more information.

    Thank you

    Fred

  • QUESTION: Can't create a firewall rule to (edge) with the REST API

    Dear Sir

    I am trying to create a firewall rule for simple and basic edge using the REST API.

    I use the REST API guide as a reference on page 158.


    edge-fw-rule.png

    I use the following code (single) in my client REST API (with good content Type (application/xml)):

    < rule >

    < ruleTag > < / ruleTag >

    < name > edge5-rest-rule < / name >

    all < source > < / source >

    < destination > all < / destination >

    < application > all < / application >

    < matchTranslated > true < / matchTranslated >

    < management > in < / direction >

    < action > deny < / action >

    < enabled > false < / enabled >

    < loggingEnabled > true < / loggingEnabled >

    rest-api-rule of the < description > < / description >

    < / rule >

    The error message that I receive is the following:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < error >

    request details invalid <>. Found no match for item rule. < / details >

    < > 223 errorCode < / errorCode >

    < / error >

    The full screenshot of my action REST API is in the screenshot below:

    full-request.png

    Anyone know what I'm doing wrong here?

    Thank you!

    Try this as the body...

    rest-rule

    user

    true

    in

    deny

    fake

    true

    rest-api-rule

  • Error in creating a category with the REST API

    vRO 7.0.1

    I am trying to create a category in the folder root of Workflow using the REST API.

    URL = https://vroserver.fqdn:8281 / vco/api/categories

    Method = POST

    The API documentation suggests that the body should be like this:

    {

    "categoryType": "WorkflowCategory",

    'name': "Test5",.

    'description': 'Testing '.

    }

    However, I always get a 400 response: the request sent by the client is syntactically incorrect.

    reflecting the docs by: category name must be specified

    Can anyone help?

    Body of the request should be:

    {
       "type":"WorkflowCategory",
       "name":"Test5",
       "description":"Testing"
    }
    
  • To access the vCOPs with the RESTful API

    VCOPs can be used such as the information it provides are accessible via the RESTful API?

    RV Ops 6.x see this thread:

    Integration of vCO and vCOps

  • How to configure Hostname of the node with the REST API?

    I tried the value of hostname of the virtual machine when I deploy an application, but were unsuccessful.  The application consists of all the operating system - there is no installed service but an example here that I used when I deployed the application.  It is based on the release of the REST API "node info": for the particular deployment profile.

    {

    'node': [{}

    "name': 'VM1."

    "properties": [{}

    "hostname": "joe".

    }],

    ["nodeComponent":]

    }]

    }

    But when you use this application I get the error message: "the node 'VM1' does not exist in the current 'deployment profile'. ' even if 'VM1' is the only node in the deployment profile.  I tried other variations and still get the same error message.

    Does anyone have suggestions for how I can configure the hostname of the node when you deploy the application?  Thank you.

    Apparently, the REST API for planning a deployment is designed after characteristic GUI Application Director "rapid deployment". Rapid deployment does not allow the substitution of properties of node as hostname. Idea being the deployment profile once defined and prepared, each individual call of it must change some subset of the properties of the component. We can always create several profiles of deployment to account for changes in node.

    Nevertheless, it seems that property of node specifications would help your situation... so that your comments reached the product team.

    Thank you rags

    This posting is provided as is and confers no rights.

  • Connection to vCloud Director 5.1 with the REST api plugin

    vco3.PNGI can't get this to work.

    I'm following part of the manual, I found here: http://blogs.vmware.com/orchestrator/2011/07/vcloud-director-twitter-yahoo-and-foursquarecom-http-rest-plug-in-use-case-examples.html

    So I install the plugin and run the workflow to add a host:

    vco1.PNG

    And set the authentication with the workflow "Set vCloud to authenticate a host REMAINS:

    vco2.PNG

    And run the supplied workflow "show a vCloud, Director of the Organization:

    vco3.PNG

    And get the error: "no valid API version can be selected.

    I also tried with version 1.0 and 1.5 of putting in the URL, but cannot make it work. What Miss me?

    Thank you.

    Hello

    It is a problem with you REST plugin does not support the vCloud 5.1 authentication correctly.

    I created the following work around to fill the gap until a new version of the plugin REST solves this problem.

    Please find here.

    Christophe.

  • Publish ads IPsets created on a scope through the REST API

    I am able to create a FPS on a range of data center as follows:

    POST https://192.168.x.x/api/2.0/services/ipset/datacenter-xx

    < ipset(8) >

    < objectId / >

    < type >

    < typeName / >

    < / type >

    < description > new Description < / description >

    < name > TestIPSet2 < / name >

    < revision > 0 < / revision >

    < objectTypeName / >

    < value > 10.112.201.8 - 10.112.201.14 < / value >

    < / ipset(8) >

    that gives me id is:

    FPS-205

    I can successfully query this FPS directly with:

    GET https://192.168.x.x/api/2.0/services/ipset/ipset-205

    < ipsetipset >

    < objectId > FPS-205 < / objectId >

    < type >

    < typeName > Ipset(8) < / typeName >

    < / type >

    < name > TestIPSet2 < / name >

    < description > new Description < / description >

    < revision > 1 < / revision >

    < objectTypeName > Ipset(8) < / objectTypeName >

    < scope >

    < id > datacenter-xx / < ID >

    < objectTypeName > data center < / objectTypeName >

    XXXXX < name > < / name >

    < / scope >

    < extendedAttributes / >

    < inheritanceAllowed > false < / inheritanceAllowed >

    < value > 10.112.201.8 - 10.112.201.14 < / value >

    < / ipset(8) >

    However, if I try to enumerate all IPsets on the scope of data center-xx, I get an error:

    GET https://192.168.x.x/api/2.0/services/ipset/datacenter-xx

    https://192.168.x.x/API/2.0/services/IPSET/Datacenter-XX

    https://192.168.x.x/API/2.0/services/IPSET/IPSET-205

    < error >

    <>details requested object: data center-xx could not be found. Object identifiers are case sensitive. < / details >

    < > 202 errorCode < / errorCode >

    < moduleName > - basic services < / moduleName >

    < / error >

    Any ideas? Surely the datacenter-xx must exist because I have successfully created a FPS on that?

    Figured it out. The URL in the documentation is incorrect, that you actually need is:

    https://192.168.x.x/API/2.0/services/IPSET/scope/Datacenter-XX

    that is, it lacks the /scope

    Once added to the request is so successful

  • ELQ-00107 errors during the export of the activity with the REST API data in bulk (2.0)

    I'm following the flow described in bulk API Documentation v2.0

    I POST to https://secure.Eloqua.com/API/bulk/2.0/activities/exports and back (note: I work in python, so it's all the deserialized json)

    {u 'createdAt': u'2014 - 08-14T 07: 05:17.6413979Z',}

    u 'createdBy': u'P of,

    u 'fields': {u 'ActivityDate': u'{{Activity.CreatedAt}} ',}

    u 'ActivityId': u'{{Activity.Id}} "},"

    u 'filter': u "('{{Activity.CreatedAt}}' > ' 2014-07-31T23:43:02.080971Z' ET '{{Activity.Type}}' = 'EmailOpen') ',"

    u 'name': u 'blarg3 ',.

    u 'updatedAt': u'2014 - 08-14T 07: 05:17.6413979Z',.

    u 'updatedBy': u'P of,

    u 'uri': u ' {/ activities/exports/275 '} '.

    Then I POST on /syncs and get back

    {u 'createdAt': u'2014 - 08-14T 07: 05:31.6571126Z',}

    u 'createdBy': u'P of,

    u 'status': u 'pending',

    u 'syncedInstanceUri': u ' / activities/exports/275 ', '.

    {u 'uri': u'/ synchronization/17790 '}

    Now (unfortunately) I GET/synchronization/17790 and/syncs/17790/logs

    {u 'createdAt': u'2014 - 08-14T 07: 05:31.9330000Z',}

    u 'createdBy': u'P of,

    u 'status': u 'error',

    u 'syncStartedAt': u'2014 - 08-14T 07: 05:32.6570000Z',.

    u 'syncedInstanceUri': u ' / activities/exports/275 ', '.

    {u 'uri': u'/ synchronization/17790 '}

    {u 'count': 2}

    u 'hasMore': false,

    u 'items': [{u 'count': 0}]

    u 'createdAt': u'2014 - 08-14T 07: 05:33.3770000Z',.

    u 'message': u 'There was an error in processing of export.',

    u 'severity': u 'error',

    u 'statusCode': u 'ELQ-00107',.

    {u 'syncUri': u'/ synchronization/17790 '},

    {u 'count': 0,}

    u 'createdAt': u'2014 - 08-14T 07: 05:33.3930000Z',.

    u 'message': u 'Sync to sync 17790, resulting from the error status.',

    u 'severity': u 'information',

    u 'statusCode': u 'ELQ-00101',.

    [{u 'syncUri': u'/ synchronization/17790 '}],

    u 'limit': 1000,.

    'offset' u: 0,

    {'u' totalResults: 2}

    All that I can find ELQ-00107 is "ELQ-00107: there was an error in processing the {type}."

    Any thoughts on what I can hurt? Pointers on how I can further debug?

    Thank you!

    Joel Rothman-Oracle Allison.Moore Christopher Campbell-Oracle Ryan Wheler-Oracle

    Hi pod.

    Try to remove all the void second precision of the elements in date filter.  '{{Activity.CreatedAt}}' > ' 2014 - 07-31T 23: 43:02.080971Z' becomes '{{Activity.CreatedAt}}' > ' 2014 - 07-31 T 23: 43:02Z'.  The second precision is not supported for export activity.

  • Updated filter shared via the REST API

    Hello I'm trying to update a shared API filter. I'm using PHP and client fredsakr/eloqua-php-application · GitHub.

    So far, I was able to retrieve the filter with the following call:

    <?php
    require('./eloquaRequest.php');
    $eloquaRequest = new EloquaRequest('site', 'User.Name', 'password', 'https://secure.eloqua.com/API/REST/1.0');
    $response = $eloquaRequest->get('assets/contact/filters?search=TheFilterName&depth=complete');
    print_r($response);
    ?>
    

    I can see the filter in the answer below:

    (
        [type] => ContactFilter
        [currentStatus] => Active
        [id] => 100761
        [createdAt] => 1380137168
        [createdBy] => 48
        [depth] => complete
        [folderId] => 1036
        [name] => TheFilterName
        [updatedAt] => 1383589417
        [updatedBy] => 48
        [count] => 254382
        [criteria] => Array
            (
                [0] => stdClass Object
                    (
                        [type] => ContactFieldCriterion
                        [id] => 1912
                        [condition] => stdClass Object
                            (
                                [type] => TextSetCondition
                                [operator] => in
                                [optionListId] => 193
                            )
    
                        [fieldId] => 100012
                    )
    
            )
    
        [lastCalculatedAt] => 1380137190
        [scope] => global
      statement] => 1912
    

    What I want to do is update that corresponds to the values of 'Compare the Contact fields' in the GUI Eloqua under Contact = > Shared Library = > Contact filters.

    Looks like he has the "[type] = ContactFieldCriterion" under the [criteria] field in the response.

    I'd get how this value in a call to REST, and also how I would update it.

    Please let me know if you need more details on this issue. Please help and thank you.

    After some research I found what I wanted to do has been updated the list of options for this filter. See http://topliners.eloqua.com/docs/DOC-3588 for documentation on the base object. But I had difficulty in updating an OptionList with the Rest API using PUT. If you can help, please visit http://topliners.eloqua.com/message/36739#36739 . Thank you.

  • 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

  • Using c# to access the REST API - 404 not found

    Hi all!

    Since there is currently no available c# example to access the REST API, I'm going at this from scratch using the Nuget - Microsoft.AspNet.WebApi.Client package.

    I was able to successfully implement a framework for code that is able to make a call to the base_uris method and successfully receive a response.

    I'm doing a transientDocuments call, but I still get a 404 not found error.  I'm hoping somewhere here may be able to enlighten.  I tried to use the current examples of Java to call REST API to get help on how to go about things.

    I create an instance of the AdobeDCREST class, and pass the BaseUrl (https://api.echosign.com/api/rest/v5/) and my key to integration.  When I make a call to the PostTransientDocuments method I pass into the path of the pdf file that I am trying to download.  PostTransientDocuments then deals with the creation of an object the HttpContent (StreamContent) of the file, and then adding the headers, ContentType and ContentDisposition.  The call to GetClient() will determine whether base_uris should be called still or not (I make the call to base_uris and storage of the api_access_point in a variable static for all other calls, as well as the java examples) and returns an object of the HttpClient with the access in the header already token.  The call to base_uris works and returns a https://api.na1.echosign.com/ api_access_point

    I then add/api/rest/v5 to the url access_point to call transientDocuments. Failure occurs during the call to PostAsync in transientDocuments with a 404 not found error.

    Here's the code I'm using to test things so far.  Any help would be greatly appreciated.  I've been spinning my wheels on that for too long already.

    using System;

    using System.Collections.Generic;

    using System.IO;

    using System.Linq;

    using System.Net.Http;

    using System.Net.Http.Headers;

    using System.Text;

    using System.Threading.Tasks;

    namespace Ivezt.Documents {}

    public class AdobeDCREST {}

    < Summary >

    A static variable that is defined by an initial call to GetBaseURIs() and used for all API calls later.

    < / Summary >

    Private Shared ReadOnly Property SERVICES_BASE_URL as string = string. Empty;

    < Summary >

    The end point of API to use.  This aspect will have to be changed if Adobe is moving to a new version of the API and we update this

    the code to use this new version.

    < / Summary >

    Private Shared ReadOnly Property API_URL as string = "api/rest/v5 /";

    < Summary >

    This BaseUrl is passed to the constructor and used to make a call to GetBaseURIs().

    < / Summary >

    private string m_strBaseUrl = string. Empty;

    < Summary >

    The IntegrationKey is passed to the constructor and must be added to the header of each API request.

    < / Summary >

    private string m_strIntegrationKey = string. Empty;

    public AdobeDCREST (string strBaseUrl, string strIntegrationKey) {}

    m_strBaseUrl = strBaseUrl;

    m_strIntegrationKey = strIntegrationKey;

    }

    private HttpClient GetDefaultClient() {}

    HttpClient client = new HttpClient();

    Add an Accept header for JSON format.

    customer. () DefaultRequestHeaders.Accept.Add

    (new MediaTypeWithQualityHeaderValue("application/json"));

    Add the access token

    customer. DefaultRequestHeaders.Add ("Access token", m_strIntegrationKey);

    customer feedback;

    }

    private HttpClient GetClient() {}

    If we have not yet the SERVICES_BASE_URL, then we must do a GetBaseURIs call

    If (SERVICES_BASE_URL. Length == 0) {}

    HttpClient baseClient = GetDefaultClient();

    Use the BaseUrl passed to the constructor

    baseClient.BaseAddress = new Uri (m_strBaseUrl);

    URI BaseURIs_Response = GetBaseURIs (baseClient);

    SERVICES_BASE_URL = string. Format ("{0} {1}", uris.api_access_point, API_URL);

    baseClient.Dispose ();

    }

    If (SERVICES_BASE_URL. Length == 0)

    throw new Exception ("failed to retrieve Adobe Document cloud Base URI");

    HttpClient client = GetDefaultClient();

    customer. BaseAddress = new Uri (SERVICES_BASE_URL).

    customer feedback;

    }

    public BaseURIs_Response GetBaseURIs(HttpClient client) {}

    Call base_uris

    HttpResponseMessage response = client. GetAsync ("base_uris"). Result;  Call blocking!

    If (answer. IsSuccessStatusCode) {}

    Analyze the response body. Blocking!

    answer back (BaseURIs_Response). Content.ReadAsAsync (typeof (BaseURIs_Response)). Result;

    }

    else {}

    throw new Exception (string. Format ("{0} ({1})", (int) response. ") StatusCode, response. ReasonPhrase));

    }

    }

    public TransientDocument_Response PostTransientDocuments (string strFilePath) {}

    Call transientDocuments

    Content the HttpContent = new StreamContent (new FileStream (strFilePath, FileMode.Open, FileAccess.Read));

    content. Headers.ContentType = new MediaTypeHeaderValue("application/pdf");

    content. Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") {}

    Name = "file."

    FileName = 'Template.pdf.

    };

    HttpClient client = GetClient();

    HttpResponseMessage response = client. PostAsync ("transientDocuments", content). Result;  Call blocking!

    If (answer. IsSuccessStatusCode) {}

    Analyze the response body. Blocking!

    answer back (TransientDocument_Response). Content.ReadAsAsync (typeof (TransientDocument_Respons e)). Result;

    }

    else {}

    throw new Exception (string. Format ("{0} ({1})", (int) response. ") StatusCode, response. ReasonPhrase));

    }

    }

    }

    public class BaseURIs_Response {}

    public string web_access_point {get; set ;}}

    public string api_access_point {get; set ;}}

    }

    public class TransientDocument_Response {}

    public string transientDocumentId {get; set ;}}

    }

    }

    I think I found my problem.  I was not a multi-part post form data.  Once I changed this, everything worked as expected.  Here is an updated version of the PostTransientDocuments() method that works:

    public TransientDocument_Response PostTransientDocuments (string strFilePath) {}

    Call transientDocuments

    using (var = {GetClient() customer)}

    using (var content = new MultipartFormDataContent()) {}

    var multiplesContent = new StreamContent (new FileStream (strFilePath, FileMode.Open, FileAccess.Read));

    fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/pdf");

    fileContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") {}

    Name = "file."

    FileName = 'Template.pdf.

    };

    content. Add (FileContent);

    HttpResponseMessage response = client. PostAsync ("transientDocuments", content). Result;  Call blocking!

    If (answer. IsSuccessStatusCode) {}

    Analyze the response body. Blocking!

    answer back (TransientDocument_Response). Content.ReadAsAsync (typeof (TransientDocument_Respons e)). Result;

    }

    else {}

    throw new Exception (string. Format ("{0} ({1})", (int) response. ") StatusCode, response. ReasonPhrase));

    }

    }

    }

    }

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

  • Update the price of the products with the v3 API

    So I try to update all the prices of my product in my product catalog programmatically. I have gone through the documentation to the product price | Catalyst of business support
    and I see that there is no end point of update of the prices of the products.  I tried also just do a PUT option with an AJAX call and is not no longer works.  Can't BC really have a way to update the prices of the products via an application?  I did a lot of things with the API v3, so I assumed that any of this would be a given, but maybe I'm wrong.

    var myurl = "/ webresources/api/v3/sites/current/products / ' + myproductid + ' / price";
    var requestC = $.ajax({)
    URL: myurl
    type: "PUT."
    connection: "keep-alive"
    contentType: "application/json",
    MIME type: ' application/json ',.
    headers: {'Authorization': $.cookie ('access_token')},
    processData: false,
    data: JSON.stringify ({}
    "retailPrice': '533.00."
    'Flags': '533.00'
    })
    });

    You can't do that. The API of POSITION for the products had not been with the rest of the update of the POST API on the products. I already talked to the engineers on this subject. No update on when it will be executed has been given.

Maybe you are looking for

  • My laptop will not be closed.

    nothing happens it just on my wallpaper. As my message of periodic report remains in the lower right screen and I can't get rid of it.

  • error code80070490

    Hello the windows system rediness tool would be of no use to try to resolve this problem I have on the basic Vista Home Edition operating system, the problem is I get a code error 80070490. Thank you Chris d

  • Contact shortcut problem

    I've created a few shortcuts to my contacts and I changed an option, but now I can't find how to restore. When I typed the contact, on the messages tab, I could choose to whatsapp assistance or the normal messages app. Then, there was a checkbox to r

  • My Favorites icon when muse my site is saved in Favorites does not match the favorite icon to the address bar. How can I fix it?

    Hello! I have a bit of mystery on my hands. Recently, I bought a Muse model site and there corresponding favicon and favorite icons. I've updated the favicon on the model site on the master pages in the Page preferences and not for the life of figure

  • vMotion on ESXi5 is not using multiple NIC

    HelloI test 4 x simultaneous vMotion operations on the host ESXi5, and "thought" he was supposed to distribute the load between the two NICS in a config.  resxtop shows that he always uses one NIC someone can provide an overview?100663298 vmnic2 - vS