IDMS REST API URL error " ZWEAS404 The service can not find the requested resource."
search cancel

IDMS REST API URL error " ZWEAS404 The service can not find the requested resource."

book

Article ID: 244468

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

Accessing the IDMS REST API using the defined web address, https://<your-hostname>:<port-number>/api/v1/systems/datasource_name
It results in the following errors: 

{"messages":[{"messageType":"ERROR","messageNumber":"ZWEAS404","messageContent":"The service can not find the requested resource.","messageKey":"org.zowe.commons.rest.notFound","messageInstanceId":"0a9e565f-d6d1-40b3-98d2-9ad9b6721d1c","messageComponent":"org.zowe.commons.spring.CustomRestExceptionHandler","messageSource":"<hostname>:37200:bcmidms"}]}

 

Environment

Release : 19.0

Cause

The  ZWEAS404 error indicates it cannot find the endpoint.

This is due to specifying the datasource name instead of the JOBNAME for the IDMS CV STARTUP.

Resolution

The correct URL structure is documented in documentation section REST API

URL Structure
The URL addresses for the REST API operations have the following structure:
<protocol>://<hostname>:<port>/api/v1/<idms_endpoint>

Where:

  • <protocol>Specifies whether http or https is enabled. Values are: http, https
  • <hostname>Specifies the host or server name, or the domain name where the service is deployed and running
  • <port>Specifies the port number that is defined on the web server
  • <idms_endpoint>Specifies the IDMS API endpoint that you want to obtain

The endpoints are documented in the same page.

The general rules to follow are:  

(1). For any endpoint not performance monitor related you use a datasource name as a path variable in the URL.
(2). For performance monitor endpoints you use the jobname.

In this case a Performance Monitor endpoint is being used, so the URL is constructed with the JOB name of the IDMS CV Start up JCL.

For example: 

- <CV jobname> is the JOBNAME for the IDMS CV Startup JCL, so the URL is constructed as shown below: 

https://<your-hostname>:<port-number>/api/v1/systems/<CV jobname>

Results: 
{
  "jobName": "<CV jobname>",
  "jobId": "JOB#####",
  "userId": "#######",
  "programName": "RHDCOMVS",
  "ascbAddress": "F07880",
  "eseAddress": "2AD4BE50",
  "csaAddress": "2DDB0",
  "svcNumber": 172,
  "cvNumber": 222,
  "pcToken": "",
  "eseStatus": 216,
  "systemFlag": 64,
  "tapeVersion": "GJJ04I",
  "asid": 770,
  "storageKey": 64,
  "versionId": 1900,
  "releaseNumber": "19.00.03"
}
Response headers
 cache-control: no-cache, no-store, max-age=0, must-revalidate 
 connection: keep-alive 
 content-type: application/json 
 date: Wed, 22 Jun 2022 20:11:29 GMT 
 expires: 0 
 keep-alive: timeout=60 
 pragma: no-cache 
 transfer-encoding: chunked 
 x-content-type-options: nosniff 
 x-frame-options: DENY 
 x-xss-protection: 1; mode=block 
Responses
Code Description
200 
OK
Example Value
Model
{
  "ascbAddress": 16230656,
  "asid": 118,
  "csaAddress": 873890,
  "cvNumber": 60,
  "eseAddress": 9433200,
  "eseStatus": 216,
  "jobId": "JOB#####",
  "jobName": "<CV jobname>',
  "pcToken": 1,
  "programName": "RHDCOMVS",
  "releaseNumber": "19.0.00",
  "storageKey": 4,
  "svcNumber": 176,
  "systemFlag": 96,
  "tapeVersion": "GJJ04I",
  "userId": "#######",
  "versionId": 600
}

Additional Information