Close
Thank you for your feedback.

Service Catalog API - GET /sn_sc/servicecatalog/catalogs

Service Catalog API - GET /sn_sc/servicecatalog/catalogs

This method retrieves a list of catalogs to which the user has access.

URL format

Versioned URL: /api/sn_sc/v1/servicecatalog/catalogs

Default URL: /api/sn_sc/servicecatalog/catalogs

Supported request parameters

Table 1. Parameters
ParameterDescription
sysparm_limitSpecify the number of entities in the response. This value applies to categories and items.
sysparm_textSpecify query text for search support. (Required)
sysparm_viewSpecify the device to display the item (desktop, mobile, or both).

Headers

The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see REST headers.

Table 2. Request headers
HeaderDescription
None
Table 3. Response headers
HeaderDescription
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST response codes.

Table 4. Status codes
Status codeDescription
200Indicates that the request completed successfully. If a valid query returned no results, the response body contains only an empty result array.

Example

Sample cURL request

curl "https://instance.service-now.com/api/sn_sc/servicecatalog/catalogs?sysparm_limit=10" \
--request GET \
--header "Accept:application/json" \
--user 'admin':'admin'
{
  "result": [
    {
      "title": "Technical Catalog",
      "sys_id": "742ce428d7211100f2d224837e61036d",
      "has_categories": true,
      "has_items": true,
      "description": "Products and services for the IT department",
      "desktop_image": "7a7c8271475211002ee987e8dee4906d.iix"
    },
    {
      "title": "Service Catalog",
      "sys_id": "e0d08b13c3330100c8b837659bba8fb4",
      "has_categories": true,
      "has_items": true,
      "description": "Service Catalog - IT Now",
      "desktop_image": "adbcc271475211002ee987e8dee49001.iix"
    }
  ]
}

Example

Sample Python request

#Need to install requests package for python
#easy_install requests
import requests

# Set the request parameters
url = 'https://instance.service-now.com/api/sn_sc/v1/servicecatalog/catalogs?sysparm_limit=10'

# Eg. User name="admin", Password="admin" for this code sample.
user = 'admin'
pwd = 'admin'

# Set proper headers
headers = {"Content-Type":"application/json","Accept":"application/json"}

# Do the HTTP request
response = requests.get(url, auth=(user, pwd), headers=headers )

# Check for HTTP codes other than 200
if response.status_code != 200:
    print('Status:', response.status_code, 'Headers:', response.headers, 'Error Response:',response.json())
    exit()

# Decode the JSON response into a dictionary and use the data
data = response.json()
print(data)

Products > ServiceNow Platform > Inbound REST web service; Versions > Helsinki