Make a Data Source Public

Use the following URLs to make your data source publicly accessible or to make it private. A public data source can be queried by anyone with a Bing Maps Key. A private data source can only queried using the data source query key only.

You can also use the Bing Maps Account Center to change the public status of a data source. For more information, see Making a Data Source Public or Private.

A job is created when you change the public status of a data source. Before using this API, review the job limits in Geocode and Data Source Limits.

To get a list of all the data source and geocode jobs submitted in the last 15 days, see Get Job List.

Supported HTTP Methods


URL templates

Set a data source to publicly accessible by setting the setPublic parameter..$updateDataSource?setPublic=setPublic&key=masterKey  

The base part of the following URL with accessID and dataSourceName is returned when you create the data source. It is also returned when you request information for all data sources that belong to a Bing Maps Account.

Template Parameters


Parameter names and values are not case-sensitive except for the key parameter value.

Parameter Description Values
accessId Required. A unique ID for the data source. A string containing and ID that is part of the URL structure that identifies the data source.

Example: a92dcfac8a0894bc4921ad5c74022623.
dataSourceName Required. The name of the data source that you want to search. A string that identifies the data source. The name is part of the URL structure that identifies the data source.

Example: FourthCoffeeSample
setPublic Required. Specifies whether the data source is publicly available or private. One of the following values:

- 1: Make the data source publicly accessible to anyone with a valid Bing Maps Key.
- 0 [default]: Do not make the data source public.

Example: setPublic=1


This URL supports the following response formats.

  • JSON: application/json

  • XML: application/xml

For information about the response, see Response Data.


EXAMPLE: Make a data source publicly available. .

The following request makes the specified data source public.$updatedatasource?setPublic=1&o=xml&key=MasterKey  

The status of Created in the response indicates that the job to make the data source public has been created. This operation is expected to take only a few minutes. You can confirm that the data source is public by requesting data source information with the Get Data Source Information API. Depending on the request and response format, one of the following parameters should be set to true: bsi:isPublic="true","IsPublic":"true", or IsPublic="true".

URL with XML Response

<Response xmlns:xsi=""   
    Copyright © 2012 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.  
        <Resource xsi:type="DataServiceJob">  
          <Description>Data source "FourthCoffeeSample" set public</Description>  
          <CompletedDate xsi:nil="true"/>  

URL with JSON Response

If o=xml was not specified in the response, a JSON response similar to the following example is returned.

   "copyright":"Copyright © 2012 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",  
               "createdDate":"Tue, 16 Oct 2012 22:47:15 GMT",  
               "description":"Data source \"FourthCoffeeSample\" set public",  

HTTP Status Codes


For more details about these HTTP status codes, see Status Codes and Error Handling.

When the request is successful, the following HTTP status code is returned.

  • 202

When the request is not successful, the response returns one of the following errors.

  • 400

  • 401

  • 500

  • 503