REST API: Query for object based on name instead of objectId

Please correct me if I'm wrong...
Right now I have to query anything and everything by the objectId. The issue is that I don't know what that is. I know the name. So, for example, If I know the objectId of an edge device named "myrouter" is "edge-1", then I can do:
     https://nsxmgr/api/4.0/edges/edge-1
Awesome! Now I get the entire config. But let's say I don't know the edgeId. Because why would I? I would, however, know its name because that's why I name things. In many other API's all I would have to do is something like this:
     https://nsxmgr/api/4.0/edges?name=myrouter
The only way I know of to do this today is to fetch ALL of the edges with the following:
     https://nsxmgr/api/4.0/edges
This returns every single edge in the scope! Then I have to do something like (in powershell):
     $router_exist = (Select-Xml -Xml $script:edges -XPath "//edgeSummary[name=`"$esr_name`"]").Node
     if ($router_exist) {
          $router_id = $router_exist.objectId
This isn't just for edges...its for every object available. Is it not possible to query based on an attribute?
Thanks,
Daniel

Thanks for the replies :-)
However my issue is that it gets loaded in a wrong format.
In our System OU Name is shown as "COMPUTERS"; "DK"; "123dom" - Instead of 123dom/DK/Computers.
We cannot make collections quering for OU name with this format in SCCM 2012. Has anyone seen this issue before? The forest was discovered using AD Forest+System+User discovery.

Similar Messages

  • REST API Query for file Versions - current version

    Hi,
    I have referred to the list of API query options from this link:
    https://msdn.microsoft.com/en-us/library/office/dn450841.aspx .
    As described in the post, the query  goes as below
    url: "<app web url>/_api/SP.AppContextSite(@target)/web
        /getfilebyserverrelativeurl('/Shared Documents/filename.docx')/versions
        ?@target='<host web url>'",
    This does not return the current file version details. Is there a way to get those details in the same query or should we place another query to get the current version file details as below
    url: "<app web url>/_api/SP.AppContextSite(@target)/web
        /getfilebyserverrelativeurl('/Shared Documents/filename.docx')
    Thanks,
    Meena

    Hi Meena,
    In FileVersion endpoint, it will only return the old versions of a file.
    If you want to retrieve all versions(including) of a file, there will be a need to run another request for the current version only, though which might cause extra workload.
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • REST API available for CCW?

    Hi Experts,
    I want to develop a web application interfacing CCW. Is there an REST API available for CCW?
    Thanks
    Krishna

    Hi, do Cisco provide a REST API for accessing the CCW in the meantime?

  • How to find keyword object based on name

    I have a CSV file with file name and keywords.
    XXX_201300511_08765.CR2,Amsterdam
    These keywords already exist in Lightroom.
    Sample: Europe->Netherlands->Amsterdam
    I understand that with photo:addKeyword ( keyword object) I can add keywords to photos.
    How can I find the keyword object in Lightroom.
    For the example, how can I find the keyword object of Amsterdam.

    Thank you John!, I was afraid that that would be the only solution.
    Imho the API of keywords should be extended with a function / method to retrieve all keywords objects based on the name description. I will make the suggestion apart.
    It is possible to find all photo object when supplying the name, like catalog:findPhotos and catalog:findPhotoByPath. Similar functions for keywords would be great.
    Are there code recipes for such a table implementations?

  • Using REST API: Query search box to return list items

    Hey,
    My goal is to create a search box which returns the items (matching to the name) from a list.
    Bonus: The return would happen without requiring user to click a
    Search button or such.
    To achieve this I assume the SharePoint 2013's REST API should be used. I'm completely inexperienced in using the REST API so all kind of suggestions are available.

    Hi,
    Here are some articles about SharePoint 2013 REST API for your reference:
    Get started with the SharePoint 2013 REST service
    http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
    How to: Complete basic operations using SharePoint 2013 REST endpoints
    http://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    SharePoint 2013 – CRUD on List Items Using REST Services & jQuery
    http://www.plusconsulting.com/blog/2013/05/crud-on-list-items-using-rest-services-jquery/
    Working with SharePoint list data - OData, REST and JavaScript
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    Best regards
    Dennis Guo
    TechNet Community Support

  • REST API Wrapper For SP

    Hi,
    I am planning to create Service based custom wrapper for sharepoint using the REST API  for my developers so fetching and basic operations becomes easier for them. it turns out that in REST API/Web Services I am supposed to pass the credentials as well.
    and since i can not pass the default credentials in my service which is out side the SharePoint environment. it will be difficult to pass the authentication. I have also thought of doing the operations using 1 single credential. But in that case all my list/document
    library etc. has that user signature in created by and modified by columns on sharepoint.
    Any suggestion ?
    Thanks, Parth

    Hi Shay,
    Thanks for reply i followed the steps given in the documents, but there is a authentication problem.
    1.I am able to see the services available in the API ----> http://host:port/rest/api/resourceIndex
    These are some of the rest services  http://host:port/rest/api/spaces/resource/templates?utoken=FAOfyLL32piL7dPu9tXJjoEFMC5n_w**
                                                          http://host:port/rest/api/spaces?utoken=FAOfyLL32piL7dPu9tXJjoEFMC5n_w**
    My question is , Are these the correct services which i need to consume in Jdeveloper (URL Service Data Control).
    While consuming these services i m getting the error like "Authentication is Required". Is it the correct way to consume these services ??.
    If not could you please tell me how to resolve this issue..? help me in this..
    Thanks.

  • Batch Rest API Upsert for CDO Field Limit?

    Currently with SOAP we can update 150 CDO fields at once, is there a 100 filed limit with Batch Rest API?

    Further to Corey's question, when using REST API, when we upsert more than 100 fields into a CDO we get an error stating that we can only update 100 fields. Is it possible to change this limitation with Bulk REST API so that we can update more than 100 fields?

  • How do I get Mozilla to use the page name for the actual bookmark name instead of the URL when I bookmark a page

    I just noticed this (in comparison to Internet Explorer): In IE, when you favorite a webpage, it uses the actual name of the webpage (for example, for this page, it would be "Ask a Question Firefox Help" as the bookmark name), but in Mozilla it uses the URL address as the bookmark name. I was wondering if it was at all possible to change my Mozilla settings in order to make it use the webpage name as the bookmark name instead of the URL address? I hope everyone understands what I'm getting at? If anyone can help me, I would really appreciate it. Thanks.

    Does this happen with each bookmark?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Problems with bookmarks and history not working properly can be caused by a corrupted places.sqlite database file.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    You can try to check and repair the places database with this extension:
    *https://addons.mozilla.org/firefox/addon/places-maintenance/

  • Dynamic sql query for report based on user input

    Hi everyone,
    I have built custom search fields (name, date born, gender etc.) in the search region and in the results region a report need to be displayed.
    Now I'm not very experienced with Apex or Oracle sql, but could anyone telll me how to first check if a user filled in a field and then build a query based upon what field the user filled in to submit.
    Any help would be appreciated, thanks in advance.
    regards,
    Cleo
    Edited by: Cleopatra on Jan 18, 2011 5:51 AM

    Hi, Cleopatra. Welcome to OTN!
    If you don't have too many fields instead of checking to see if they're filled in you can use OR conditions in yoru WHERE_CLAUSE to check for NULLS to ignore NULLS, something like (you will have to test this carefully!)
    AND some_column = NVL(:P24_1,some_column)the idea being that if the field is NULL then the column will match itself - in this case assuming the column itself does not have a null value

  • Update Query for Object Table

    Hi All,
    I have table column defined as user defined data type. That User defined data type contains many columns.
    My requirement is i want to update one particular column of that User defined data type column.
    How should i update.
    Pls help me.
    I am using Oracle 10g.
    I have listed below one table and its associated columns.
    PERSON_ID VARCHAR2(20)
    PHIN_NO VARCHAR2(20)
    SSN_NO VARCHAR2(20)
    PERSON_NAME XPN
    That XPN data type consists of
    FAMILY_NAME FN
    GIVEN_NAME VARCHAR2(30)
    MIDDLE_NAME VARCHAR2(30)
    SUFFIX VARCHAR2(20)
    PREFIX VARCHAR2(20)
    DEGREE VARCHAR2(6)
    For example If i want to update prefix column value. how should i do?
    Cheers
    Moorthy.GS

    Hi,
    In My XPN Object type contains
    Structure:-(FAMILY_NAME(FN),GIVEN_NAME,MIDDLE_NAME,SUFFIX,PREFIX,
    DEGREE,NAME_TYPE_CODE,NAME_REPRESENTATION_CODE,
    NAME_VALIDITY_START_DATE,NAME_VALIDITY_END_DATE,
    NAME_ASSEMBLY_ORDER,EFFECT_DATE,EXPIRATION_DATE,
    PROFESSIONAL_SUFFIX,NAME_CONTEXT)
    Sample Values:- XPN(FN('BALU','','','',''), 'NAVEEN','G','', 'DOM000327','','','','12-JUL-06 11.57.57.854000 AM','12-JUL-06 11.57.57.854000 AM','','12-JUL-06 11.57.57.854000 AM', '12-JUL-06 11.57.57.854000 AM','','')
    I want to update the value for Prefix compent, then how should?
    Pls help me
    Cheers
    Moorthy.GS

  • WQL query for collection based on file properties not add remove

    Hi
    I have an issue where a .exe file does not have the updated version number available in add remove programs. The only way I know to get the version number is to right click the file and view version there.
    I need to make a collection based on the information available in properties. Is this possible? How would I write the query?
    Thanks

    Hi,
    to perform this kind of operation on a .exe file you need to configure software inventory.
    Inside the properties just choose to Collect File Details and select a path to scan.
    http://technet.microsoft.com/en-us/library/bb633191.aspx and http://technet.microsoft.com/en-us/library/bb632607.aspx

  • Select query for objects under "Other_Users"

    I can see all tables and view under "Other Users" but how do I run a select statement?
    There is an instance named "COURSES" under  "Other Users" and I want to select top 10 records from a table named "District"

    I am using SQL Developer and all tables and views and views are listed under "Other_Users".  Select * from COURSES.District gives me an error "invalid table name"
    Schema Name = COURSES
    Table Name = District
    I just want to execute a simple select statement.

  • Are there REST APIs to retrieve entity metadata for  eloqua objects?

    There is a list of all the objects which can be accessed by REST for CRUD in this link: REST API - Documentation for Core Objects under the Core Objects section.
    For each of the objects listed under the  Core Objects section are there is a field metadata under the Properties section.
    For example for Email object, REST API - Accessing Emails , under the Properties section, there corresponding entries for fields of Emails object under the
    Name ,Type, Description and Validations headings.
    Is there a REST API for retrieving the same information i.e. the field metadata for an eloqua object programmatically ?
    If not , it is a serious hindrance to building systems that are metadata driven and also since SOAP support is being deprecated...

    Metadata is 'top level' information on the object, and available whether you query the individual object (a single form, or email asset) or query for multiple objects of that type (list all forms, list all emails). Consider using a depth of minimal or partial for faster performance if the specific configuration of those objects is not important..
    Example:
    GET /assets/forms?depth=minimal&count=2
    Returns:
      "elements":
        "type":"Form",
        "currentStatus":"Draft",
        "id":"19",
        "createdAt":"1409623550",
        "createdBy":"8",
        "depth":"minimal",
        "folderId":"7",
        "name":"zzztestCS_3-9381543541_AutocompleteTest",
        "permissions":"fullControl",
        "updatedAt":"1409623623",
        "updatedBy":"8"
        "type":"Form",
        "currentStatus":"Draft",
        "id":"22",
        "createdAt":"1409781207",
        "createdBy":"11",
        "depth":"minimal",
        "folderId":"466",
        "name":"daisychain1",
        "permissions":"fullControl",
        "updatedAt":"1412779449",
        "updatedBy":"20"
      "page":1,
      "pageSize":2,
      "total":130
    Without limiting the count to 2, this would return up to 1000 results if you had multiple forms in your system and give you a basic top level view of each. Similarly, you can use GET /assets/form/{id}?depth=minimal to get the same sort of information.
    Other endpoints can be found on the REST livedocs page here (requires authentication):
    https://secure.eloqua.com/api/docs/Dynamic/Rest/1.0/Reference.aspx
    Regards,
    Bojan

  • Which Objects should I target for integrating Eloqua REST API 2.0?

    Which Objects should I target for integration? and What are the possible use cases for the additional objects other than core objects?

    I am still trying to find a good REST API 2,0 document like the Bulk 2.0 document.  Book List: Oracle Marketing Cloud
    I did find this but is also not in depth:
    REST API - Documentation for Core Objects

  • How to use search REST api to get custom managed property data for anonymous user?

     
    I am trying build a public portal with anonymous access and i am trying to read some
    content from custom managed property using search REST api in sharepoint 2013. I have tried to enable all possible attributes of the managed prop. Like searchable,queryable,safe etc. also i am including queryparametertemplate in my REST api search query. But
    still i am not able to retrieve the managed prop. For an anonymous user. The same query returns the value if i am logged in.
    Any Help is greatly appreciated. 
    Thanks,
    Rakesh
    Thanks, Rakesh

    Hi Rakesh,
    To enable anonymous Search REST queries, we need to create queryparametertemplate.xml and upload it to the correct library in SharePoint.
    From your description I can know that you have created the file, then I recommend to check the things below:
    Please use “QueryTemplatePropertiesUrl” instead of “queryparametertemplate” in the Search REST API query as following: &QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml'.
    Make sure that the Query Properties you need have been added to the QueryProperties element in the queryparametertemplate.xml file.
    Make sure that the query parameters you need have been added to the WhiteList element in the
    queryparametertemplate.xml file. For example, if you want to use Refiners in the REST API, then the Refiners should be added to the
    WhiteList element in the queryparametertemplate.xml file as following:
    <a:string>Refiners</a:string>.
    You can also debug setting properties in anonymous Search Rest queries following the link below:
    http://www.mavention.com/blog/debugging-setting-properties-anonymous-search-rest-queries
    More references about anonymous Search REST:
    http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/
    http://msdn.microsoft.com/en-us/library/office/jj163876%28v=office.15%29.aspx#bk_AnonymousREST
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • PAYMENT AND RECEIPT RECONCILIATION

    Hi All, For payments and receipts to have a RECONCILED status, is it required to match them with a bank statement line? Is there any way to reconcile them without creating a bank statement in Cash Management? We used to manually clear the payments, u

  • Integration b/n MM and SD

    Hi Friends,   Please can anybody detail integration points b/n MM Module and SD Module?   (also specify the underlying databse table names and fields with detail) . Regards Srinivas

  • Ubuntu 14.04 taking forever to install

    Hi, When installing Ubuntu 14.04 LTS on my 2013 MacBook Air, I get to the partition bit, partition and it gets stuck and has taken over 12 hours so far, with no progress. Is there anything I am doing wrong? Thanks in advance

  • DDL and DML tool for unicode

    Which tool is able to maninupalate UTF-8 encoded data saved in Oracle database? (execute DDL and DML commands with non latin text)

  • AutoCad on Mac

    OK, so I installed CrossOver (Mac application for running windows apps without installing windows) for mac on my MBP. I then attempted to install Autocad 2005 but got an error. Here is a screen shot of the steps I took: #1: Double-clicked the install