PROBLEM

Using the f=json parameter in a service URL returns incomplete and unformatted JSON in ArcGIS Server

Last Published: April 26, 2024

Description

In some cases, utilizing the f=json parameter in a service URL to search for an item or user in ArcGIS Portal Directory returns incomplete and unformatted JSON. In this example, typing the following URL to retrieve all the user information returns incomplete information, as shown below.

https://machine.domain.com/webadaptor/sharing/rest/community/users/<user>?f=json
The image of the incomplete details being returned after using the f=json parameter

The image below shows an example of the complete formatted JSON.

The image of the incomplete details being returned after using the f=pjson parameter

Cause

This is by design. Using the f=json parameter in the URL is part of a supported workflow that requires a token to view all data. The parameter without the token returns an incomplete JSON for security purposes.

Solution or Workaround

Use the f=pjson parameter

In the web browser, use the f=pjson parameter. In this example, the following URL displays the complete and formatted information.

https://machine.domain.com/webadaptor/sharing/rest/community/users/<user>?f=pjson

Acquire the token

In ArcGIS Server, acquire the token to access the complete JSON. Refer to ArcGIS Server: Acquire ArcGIS Server tokens for instructions. After acquiring the token, add the token after the f=json parameter in the URL.

This is the full URL with the acquired token:

https://machine.domain.com/webadaptor/sharing/rest/community/users/<user>?f=json&token=<acquired_token>
The image of the example URL with the acquired token.

Article ID: 000032518

Software:
  • ArcGIS Server
  • ArcGIS Enterprise 11 0
  • ArcGIS Enterprise 11 1
  • ArcGIS Enterprise 11 2

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options