getItemApiUrl

Function

Get the fully qualified URL to the REST end point for an item.

Get the fully qualified URL to the REST end point for an item.

  • getItemApiUrl(item: IItem, portalUrlOrObject: string | IPortal | IHubRequestOptions | IRequestOptions, token: string) : string

Parameters

Parameter Type Default Notes
item Required IItem

w/ id and access

portalUrlOrObject Optional string | IPortal | IHubRequestOptions | IRequestOptions

a portal base or API URL, a portal object, or request options containing either of those

token Optional string

token for the current user's session; will only be appended as a query parameter if the item's access is not public

Returns

URL to the item's REST end point, defaults to https://www.arcgis.com/sharing/rest/content/items/{item.id}?f=json

string

Function defined in common/src/urls/get-item-api-url.ts:15