2

I have a list named as Students and it has 3 Columns named - Name, Branch, Age

When I try to read them using the REST API with the url:

https://mywiprolabs.sharepoint.com/javatutorial/_api/web/lists/getbytitle('Students')/items?$select=Title,o3or,qccv&$filter=Title eq 'Sadanand'

I get the following result:

<?xml version="1.0" encoding="utf-8" ?> 
- <feed xml:base="https://mywiprolabs.sharepoint.com/javatutorial/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
  <id>5512a88c-7a6e-4e45-91a9-99cd2babdfbb</id> 
  <title /> 
  <updated>2013-12-18T07:37:48Z</updated> 
- <entry m:etag=""1"">
  <id>17a80dbb-1bb8-4293-a915-57f74ed337be</id> 
  <category term="SP.Data.StudentsListItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /> 
  <link rel="edit" href="Web/Lists(guid'f47cb1b3-4a87-4646-81fb-a9bf656b9a90')/Items(1)" /> 
  <title /> 
  <updated>2013-12-18T07:37:48Z</updated> 
- <author>
  <name /> 
  </author>
- <content type="application/xml">
- <m:properties>
  <d:Title>Sadanand</d:Title> 
  <d:o3or>EC</d:o3or> 
  <d:qccv m:type="Edm.Double">23</d:qccv> 
  </m:properties>
  </content>
  </entry>
  </feed>

In the select list i have to use the internal Names such as Title for Name and o3or for Branch and qccv for Age.

These internal names are taken from the list settings page, where if you click on any column name for eg: Branch it opens it's properties and in the URL of the browser it comes like this:

https://mywiprolabs.sharepoint.com/javatutorial/_layouts/15/FldEdit.aspx?List={F47CB1B3-4A87-4646-81FB-A9BF656B9A90}&Field=o3or

where Field=o3or in the end of the url refers to as the internal Name of the Column for Branch.

I want to know why I'm not able to access them using the Name which is specified by me while creating the List.

4

Unlike REST API in SP 2010 where display name of fields with following rules can be used: 1. Preserve casing, remove spaces and keep the first letter of each individual word as Capital. For example a field with display name "home aDdress" will be "HomeADdress". 2. If a special character like dot is in field name or List name it is to be treated like space i.e. if field name is "Add.ress" the REST equivalent will be "AddRess"

In SP 2013 REST API it is the internal names of the fields which are used.

2

Almost everything when programming in SharePoint will use the internal name of something, not the display name, as this can be changed by users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.