getItemInfo

getItemInfo

Function
getItemInfo(idstring, requestOptions?IGetItemInfoOptions): Promise<any>
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
import { getItemInfo } from "@esri/arcgis-rest-portal";
// get the "Info Card" for the item
getItemInfo("ae7")
  .then(itemInfoXml) // XML document as a string
// or get the contents of a specific file
getItemInfo("ae7", { fileName: "form.json", readAs: "json", authentication })
  .then(formJson) // JSON document as JSON

Get an info file for an item. See the REST Documentation for more information.

Parameters
ParameterTypeNotes
id
string

Item Id

requestOptions
IGetItemInfoOptions

Options for the request, including the file name which defaults to iteminfo.xml. If the file is not a text file (XML, HTML, etc) you will need to specify the readAs parameter

Returns 
Promise<any>

A Promise that will resolve with the contents of the info file for the item.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.