REST API List Column Names

I have a column in a list named 'Position'. But I can't use that name in the REST query for some reason. I did some investigation and found it's named something else in the API.
For example this doesn't work:
http://dev.spdev.local/sites/test/_api/web/lists/getbytitle('Mega%20Dropdown')/items?$select=Position
But this does work:
http://dev.spdev.local/sites/test/_api/web/lists/getbytitle('Mega%20Dropdown')/items?$select=OData__x0074_c61
Is this how it's supposed to work? Looking at the
documentation it seems like I should be able to use 'Position'.

your first REST query should work as long as internal name of the position column is same. You can check  by running below query which will display the metadata for columns along with their columns
"http://dev.spdev.local/sites/test/_api/web/lists/getbytitle('Mega%20Dropdown')/items"
For position column it will display like this  "<d:position>Hello</d:position>", Hello is the data store in the list item against position
column.
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

Similar Messages

  • How to list column names and data types for a given table using SQL

    I remember that it is possible to use a select statement to list the column names and data types of databaase tables but forgot how its done. Please help.

    You can select what you need from DBA_TAB_COLUMNS (or ALL_TAB_COLUMNS or USER_TAB_COLUMNS).

  • List column names of sql table

    I know it is basics, just slipped out of my mind, How do we list or print the columns names of table in sql server 2000.
    thanks,

    Code Snippet
    SELECT C.Table_Catalog DB,C.Table_Schema, C.Table_Name, Column_Name, Data_Type
    FROM Information_Schema.Columns C JOIN Information_Schema.Tables T
    ON C.table_name = T.table_name
    WHERE Table_Type = 'BASE TABLE'
      AND DB = 'DatabaseName'

  • Rest Api Time (Time return by _api/web/lists/byname("name")/items(id=1)

    HI All,
    I have a query regarding Rest API.
    I am getting time of item created and modified using _api/web/lists/byname("name")/items(id=1).
    It is returning always UTC time zone.
    Is there any relavent article saying that this is default for all sharepoint (Because I have observed the same in all of my virtual meachines sharepoint servers).
    Is there any java script to convert to Site regional settings(In day light savings also).
    Mainly I need any article related to waht API return time will be ?
    Thanks
    Koti

    Hi Koti,
    SharePoint stores all date field in UTC. That is, if you are saving a date time field in a list, SharePoint actually converts the time that you selected into UTC, and converts it back to whatever time zone the person is in when retrieving.
    When using any API SharePoint will always return the UTC time and leave it up to you to make the conversion in your interface or application.
    You could read the time from database and convert the time to your local time.
    You could refer to the JavaScript code example below to convert the time zone.
    self.toUtc = function (inputDate) {      
      var localTime = inputDate.getTime();       
     var localOffset=inputDate.getTimezoneOffset() * 60000;       
     var utc = localTime + localOffset;      
      var retval = new Date(utc);       
     debugger;       
     return retval;
    The article below is about time zone Issues when working with dates in SharePoint’s REST services.
    https://yetanothersharepointblog.wordpress.com/2013/07/14/timezone-issues-when-working-with-dates-in-sharepoints-rest-services/
    The article is about SharePoint Time Zone confusion in SharePoint 2010, it also can work in SharePoint 2013.
    http://www.techgrowingpains.com/2012/05/sharepoint-time-zone-confusion-2/
    The article below is about JavaScript Date Reference.
    http://www.w3schools.com/jsref/jsref_obj_date.asp
    Best regards,
    Sara Fan
    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]

  • How to create list items with multiple attachment files using rest api javascript

    In one of user form I am using javascript rest api to create a list item with multiple attachment files. So far I am able to create list item and once created uploading an attachment file. But this is two step process first create an item and then upload
    a file.
    It create an additional version of the item which is not desired. Also I am not able find a way to attach multiple files in a go. Following is the code I am using.
    createitem.executeAsync({
                    url: "/_api/web/lists/GetByTitle('UserForm')/items(1)/AttachmentFiles/add(FileName='" + aFile.name + "')",
                    method: "POST",
                    contentType: "application/json;odata=verbose",
                    headers: {
                        "Accept": "application/json;odata=verbose",
                        "X-RequestDigest": $("#__REQUESTDIGEST").val()
                    binaryStringRequestBody: true,
                    body: fileContent,
                    success: fnsuccess,
                    error: fnerror
    So somehow I need to combine item attributes along with attachment files in body: param. I visited https://msdn.microsoft.com/en-us/library/office/dn531433.aspx#bk_ListItem but no success.
    Appreciate any help.

    Thanks Mahesh for the reply and post you share it was useful.
    But this does not solve the core of the issue. You are uploading attachments after creation of item and multiple files are being attached in loop. This is kind of iterative update to an existing item with attachments. This will end up creating multiple versions. 
    What I am trying to achieve is to create an item along with multiple attachments in a go. No item updates further to attach a file.
    Please suggest how this can be done in one go. SharePoint does it when one creates an item with multiple attachment.
    Thanks for your reply.

  • How to filter the Rest Api data based on Taxanomy columns

    Hi Everyone,
    We are using SharePoint2010 Standard Edition.
    I wanted get the library details through REST Api. I am using as below:
    https://SiteUrl/_vti_bin/listdata.svc/Documents?$filter=Title eq 'SharePointDoc'
    Here I am able to get the info regarding "SharePointDoc". But when I am trying to get the details from Taxonomy filter, it didn't.
    Can anyone please tell me how can we filter based on Taxanomy fields.
    Thanks in Advance
    Krishnasandeep

    Hi,
    I understand that you wanted to filter the Rest Api data based on Taxanomy columns.
    Per my knowledge, in SharePoint 2010 , not all types of column are available via REST, most annoyingly managed metadata columns are amongst this group of unsupported column types.
    However, in SharePoint 2013, we can filter list items based on taxonomy (managed metadata) columns.
    Taxonomy fields can be now called via REST API using CAML query in REST calls.
    Here is a great blog for your reference:
    http://www.cleverworkarounds.com/2013/09/23/how-to-filter-on-a-managed-metadata-column-via-rest-in-sharepoint-2013/comment-page-1/
    You’d better to change the REST calls and the CAML query to check whether it works in SharePoint 2010.
    More information:
    http://platinumdogs.me/2013/03/14/sharepoint-adventures-with-the-rest-api-part-1/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to get permission of a sharepoint list for a user using REST api

    Hi there,
    I have a requirement where i need to check the access permission of a user against a List or Library only using REST api from my remote salesforce app. [I already have access token and I am able to view list, add item etc..]
    Say for example, I have to send the list name and user name, and get the result as Read, Write, Contribute(Manage), None. I need to display what permission does that user have for that List.
    How do I achieve this. Please help me.
    Thanks in advance.

    Hi,
    For High and low bits, we can create a new SP.BasePermissions object to use like below:
    function success(data){
    var permissions = new SP.BasePermissions();
    permissions.set(SP.PermissionKind.manageLists);
    var hasPermission = permissions.hasPermissions(data.d.EffectiveBasePermissions.High, data.d.EffectiveBasePermissions.Low);
    Here is a detailed article for your reference:
    http://www.lifeonplanetgroove.com/checking-user-permissions-from-the-sharepoint-2013-rest-api/
    Thanks
    Best Regards
    Jerry Guo
    TechNet Community Support

  • Newly created Image not listed via REST API

    Hi,
    I have created a image in azure console .Its created successfully and i could see the created image under "Image" tab in console.Also, the image created with the name appending current date, it was not before.But when I am trying to list images by
    using the below REST API its listing images except the newly created images that have the  name appended with current date.
    https://management.core.windows.net/5f2fe4c3-23b3-45c0-a70c-9560b79dcf56/services/images
    header values:
    x-ms-version : 2012-03-01
    Content-Type : application/xml
    Host: management.core.windows.net
    This makes me fail to launch new VM via REST api.I got the response as follows
    <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadRequest</Code><Message>The image vmyffdd-20140605-813455l does not exist.</Message></Error>
    Please look into this.

    hi,
    From the error, your request parameter was incorrect. I guess your image name may be wrong. How did you write your Image name and url? I suggest you don't forget the '.VHD'. Also,if you use the
    VMImageName element which is only available using version 2014-02-01 or higher
    And I suggest you could try this code sample about how to using REST api to create VM :Simple Windows Azure REST API Sample Tool
    Please try it.
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 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

  • How to create list of a View's column names and source

    Using SQL 2005, 2008, and 2012
    How to create list of a View's column names and source. For the following example would like to @Print something like the following.  Does anyone already have some code to do this? I realize there are probably some gotchas, but the views that I am looking
    at to use this follows the code snippet pattern below.
    DBACCT.[Account Number]
    dbo.ConvertDate(DBACDT). [Boarding Date]
    DBXES.DBXES
    CREATE VIEW [dbo].[v_ods_DBAL]
    AS
    SELECT DBACCT AS [Account Number], dbo.ConvertDate(DBACDT) AS [Boarding Date], DBXES
    FROM dbo.ods_DBAL

    The column information can be obtained from INFORMATION_SCHEMA.COLUMNS view using logic like below
    SELECT c.COLUMN_NAME,c.DATA_TYPE
    FROM INFORMATION_SCHEMA.COLUMNS c
    WHERE EXISTS (SELECT 1
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_NAME = c.TABLE_NAME
    AND TABLE_TYPE='VIEW')
    http://technet.microsoft.com/en-us/library/ms188348.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • List View - Remove Group By Headers - Column Names

    I have a List View web part using Group By. However, when you do that, it uses the Actual column name with a colon in the visual representation.
    Also, there is a bar with the name of the column showing.
    I don't want to have either of these showing. I have found pages on the net that tell you how to do this using SPD, but because that causes unghosting, we don't use SPD.
    Also, I found this, using Javascript:
    http://amitphule.blogspot.com/2011/10/hiding-group-headers-from-sharepoint.html
    This works. However, it removes the Editing components of the ribbon also - you can't go back later and do any editing.
    Does anyone have any other ideas on this?

    Hi,
    According to your post, my understanding is that you wanted to remove Group By Headers in the List View web part.
    I try to reproduce the issue using the code you provided, however, I can edit the items.
    The initial status:
    The final status:
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • SharePoint 2010 Rest API: How to add attachment to a list item via ListData.svc

    Hi
    I have set up a project using the REST API in c# Visual Studio 2010.
    I have added a service reference to the URL //site/_vti_bin/listdata.svc/
    I can query the list and get back data, but I can't retrieve the attachments.
    I can write data to the list, but I can't add attachments.
    Are there any examples of how to add or retrieve attachments using the REST API services.
    Thanks
    Mike

    Hi,                                                             
    If you want to work with list attachments using REST API, here are some links will show how to do this using Javascript:
    http://msdn.microsoft.com/en-us/library/office/dn292553.aspx#FileAttachments
    http://chuvash.eu/2013/02/20/rest-api-add-a-plain-text-file-as-an-attachment-to-a-list-item/
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/06/27/how-to-get-list-item-attachments-using-rest-and-javascript-in-sharepoint-2013.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Set the column name of a table in a list box

    is there any code to set the column name of a table in a list box at oracle devloper 6i?
    pls help.

    I dont want to go for pl/sql . It should work any table.You want Dynamic SQL without using PL/SQL? Tricky. I'm sure there's a possible way using some very complex and convoluted XML functionality of SQL but in reality you are asking for something that isn't natural to SQL queries, especially if you are expecting a dynamic number of columns to be produced for each row of data. SQL expects a table structure, including output formats, to be a defined number of columns with any number of rows, not a defined number of rows with any number of columns.
    Perhaps if you explain why you need this sort of functionality then we may be able to offer a better solution.
    ;)

  • How to update 500 list items using Rest API

    Hi All,
    i have requirement that is "required to update 500 list items using rest Api".
    how can i do it,please share your thoughts with me.
    Thanks,
    Madhu.

    Didn't get you correctly, if you asking reference for REST API to update list items please refer below links
    http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
    Destin -MCPD: SharePoint Developer 2010, MCTS:SharePoint 2007 Application Development

  • List of common column name in a table

    I had an urgent request to check for common column name in a table. The table that I can currently have select privelge is ALL_TAB_COLUMNS. I need to list all column_name, table_name, and owner. Thanks.

    SQL> sho user
    USER is "SCOTT"
    SQL> select * from tab
      2  where tname like '%EMP';
    TNAME                          TABTYPE  CLUSTERID
    EMP                            TABLE
    V_EMP                          VIEW
    SQL> select distinct owner, table_name
      2  from all_tab_columns
      3  where table_name like '%EMP';
    OWNER                          TABLE_NAME
    SCOTT                          EMP
    SCOTT                          V_EMP
    SYS                            EXU7COL_TEMP
    SYS                            EXU8COL_TEMP
    SQL>

Maybe you are looking for