Import a workflow with Orchestrator rest API

Hello

I am trying to import a workflow to Orchestrator through the REST API, but it always end upward with a 500 error:

HTTP/1.1 100 continue
HTTP/1.1 500 Internal Server Error
Content-Type: text/html; charset = utf-8
Transfer-Encoding: segmented
Date: Thu, February 28, 2013 16:54:57 GMT
Connection: close
Server: vCO Server
I proceed in this way:
I prepare the file that will be sent:

-5bf10fbcf09

Content-Disposition: form-data; name = "listVm"; filename = "listVm.Workflow"

Content-Type: application/zip

Binary

-5bf10fbcf09-

and then make a POST request to my server of vCO:
curl - ik u "user: pass" h "Accept: application / xml ' h ' Content-type: multipart / form - data; "limit = - 5bf10fbcf09 ' h ' content-length: 19442 ' https://IP:PORT/api/stream / x POST @listVm.wf d
Then it'll wait state:
HTTP/1.1 100 continue
and about 60 years later it returns me an error 500
Thanks for your help!

Here is a code that a workflow is important in a category:

SessionFactory VcoSessionFactory = new DefaultVcoSessionFactory (new URI ("https://vcohost:8281 / api")) {}
@Override
protected SSLContext newSSLContext() throw KeyManagementException, {NoSuchAlgorithmException}
Return newUnsecureSSLContext();
}
@Override
protected HostnameVerifier {} newHostnameVerifier()
Return newUnsecureHostnameVerifier();
}
};
This is for basic authentication in the what the vCO is in LDAP mode
Authentication Authentication = new UsernamePasswordAuthentication ("userName", "password");
It is to the SSO authentication
Authentication Authentication = null;
try {}
SsoAuthenticator authenticator =
new SsoAuthenticator (new
1800 l);
Authentication =
authenticator.createSsoAuthentication ("userName",
"password");
} catch (IOException e) {}
throw new RuntimeException ("Cannot authenticate to the OSP", e);
} catch (URISyntaxException e) {}
/ / There are unlikely to occur
// }
Session VcoSession = sessionFactory.newSession (authentication);
WorkflowService wfService = new WorkflowService (session);
wfService.importWorkflowInCategory ("categoryId", new file)
'path_to_some_workflow.workflow'));

I have this code I use only the customer is provided with vCO:

https://vcohost:8281/API/docs/downloads.html

Hope this helps

Concerning

Ivan

Tags: VMware

Similar Questions

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

  • 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

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

  • How to import plugin VCO through the REST API

    I try to import plugin VCO via customer REST VCO, it always by listed below error

    Exception in thread "main" org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error

    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:92)

    at org.springframework.web.client.RestTemplate.handleResponseError(RestTemplate.java:494)

    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:451)

    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:423)

    at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:328)

    at com.vmware.o11n.sdk.rest.client.services.PluginService.importPlugin(PluginService.java:65)

    at com.vmware.o11n.sdk.rest.client.services.PluginService.importPluginFromFile(PluginService.java:53)

    at FileUploadAdv100.uploadVCOPluginsList (FileUploadAdv100.java:53)

    at FileUploadAdv100.main (FileUploadAdv100.java:26)

    My code is here

    File pluginFile = new File("D:\\vcoplugins\\JAVARESTSDK_Examples\\o11nplugin-powershell-1.0.1.vmoapp");
    Boolean overwrite = false;
    SessionFactory VcoSessionFactory = createSessionFactory();
    Authentication auth = createAuthentication (sessionFactory);
    Session VcoSession = sessionFactory.newSession (auth);
    PluginService pluginService = new PluginService (session);
    pluginService.importPluginFromFile (pluginFile, overwrite);

    Concerning
    APR

    Hi APR,.

    PluginService.importPluginFromFile () supports only import plug-ins of .dar files, not files .vmoapp.

    The good news is that you can extract the .dar file is the .vmoapp file. Simply open the file .vmoapp with a program that can open. ZIP archives (like WinRar, WinZip, 7-zip, etc.) and check out the .dar file. Then change your code to pass the path to the file .dar (the first line of your code).

    Another option would be to try PluginService.importApplicationFromFile (), which should support the import of .vmoapp files.

    Hope this helps,

    -Ilian

  • In Apple Mail, I managed to import a box mailbox, but I can't move the mailbox imported to be with the rest of my mail

    I accidentally deleted one of my 4 Apple Mail accounts.  Using my backup, I followed the procedures of Apple and successfully imported this box to my backup hard drive letters.

    Using Apple Mail, I managed to import the box mailboxes in Apple Mail from my backup, (the mails I wanted are) but I can't MOVE the mailbox imported to be with my other 3 mail accounts.  This folder contains 2 files, incoming messages and sent messages.

    I wanted to move the 'Import' folder to the "Mailboxes" section in the sidebar (just below ' boxes ' are my 3 "Inbox". Below are my 3 sent icons. (it looks like a paper airplane).

    I even tried to create a new Inbox mailbox, but this new mailbox does not have anything new under the "Inbox" and "Sent" icons.

    Try to add the account back and then copy import emails to the mailbox to the appropriate account.

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

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

  • Run a workflow with REST APIs

    Hi all

    I'm not able to run the workflow with the REST api.

    POST https:// < < HOST > >: < < PORT > > / api/workflows/94dd5f20-c190-4023-a0a7-1589c46f3792/executions/

    Here is the answer. VCO is not all workflow runs so I assumed nothing was performed. I can run to the https://wxpcpvcd006a:8281 / api/stream/f29ebe52-27b2-42d1-84f1-6ecfb939326c to get all the info on the workflow. Any help appreciated.

    {

    'relations': {}

    "total": 0.

    "link":]

    {

                    "href": " https://wxpcpvcd006a:8281 / vco/api/stream/94dd5f20-c190-4023-a0a7-1589c46f3792 / ",

    'rel': 'up '.

    },

    {

                    "href": " https://wxpcpvcd006a:8281 / vco/api/stream/94dd5f20-c190-4023-a0a7-1589c46f3792/executions/ ",

    'rel': 'Add '.

    }

    ]

    }

    }

    Simply enter the braces of opening and closing as your json content:

    {}
    
  • vRO package import/export using the REST API, but what to rebuild a package?

    Hello

    I can export and import a package using the REST API. The package consists of all the workflows in a certain folder of the project.

    That's fine, but when we do another workflow example in the folder of our project, it is not automatically part of the package. This reduces the value of planning an export of it, because it would still this manual interaction.

    Is there a way to do it (automate/CLI/REST /...) this?

    Thank you!

    Ed

    Hello

    REST API for package management (adding/removing items to package, rebuild a package, etc.) are planned for the next version of vRO - vRO 7.1 (or whatever the COMP version it gets).

  • 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

  • Music problems

    I'm on my ipod, and I tried to get a few songs on iTunes that I had already purchased. But when I went to the song, he says "purchased" only and it would not lket download me. He wouldn't let me not even to buy it, there is no way for me to get the s

  • Satellite L30-101 starts with only the PXE message

    Hi all I have a problem with my Satellite L30-101 (33rd PSL)When I start this is the message I get PXE - E61: MEDIA TEST FAILURE, CHECK CABLE PXE - MOF: EXIT PXE ROM OPERATING SYSTEM NOT FOUND I replaced the HARD drive, but I still get the same messa

  • Lenovo y50-70 WiFi reconnect all the time

    Hello world I use Lenovo y50-70 with processor i5 for two months. I'm just tired of trying to fix it myself this is why this post. My wi - fi is *. I upgraded my os to Windows 10 and had problem with 'limited connection', when you had to disconnect a

  • I can't get my web cam to work. I have a top hp touchsmart desktop pc

    I haven't used my web cam because I had my pc. I have a HP TouchSmart 310-1126 Desktop PC. The web cam worked the day that I got the computer and I tried to use it recently and not couldn't get it lights up.

  • HP pavillion a6720y clock problem

    The time on my HP Pavilion a6720y desktop PC display is seriously wasting time. I think I need to replace the internal battery, but I'm not sure if us a solution. Also, not sure where to find the battery once I find.