How to update an API requester

You can use the HTTP method PUT to update a z/OS® Connect API requester.

zosConnect-2.0 Applies to zosConnect-2.0.

Note: By default, an API requester has the status started. It can be set to a specific initial status by appending a query string to the URI with a status. For example,

/zosConnect/apiRequesters/{apiRequesterName}?status=stopped
HTTP method
PUT
URI
/zosConnect/apiRequesters/{apiRequesterName}
Description
Updates the named API requester in z/OS Connect using the new API requester archive file.
Note:
  1. The API requester needs to be stopped before updating.
  2. The API requester archive being updated needs to be for the same API requester.
Security
Users with the Admin or Operations authority can update an API requester; users with the Invoke or Reader authority cannot.
Request body
The API requester archive file. The Content-Type for the request is application/zip.
Response body

{
    "name": "{apiRequesterName}",  
    "version": "{version}",  
    "description": "{API requester description}",  
    "status": "Stopped",  
    "apiRequesterUrl": "http(s)://{host}:{port}/{basePath}",  
    "connection": "{Endpoint Connection id}"
}
Example response body

{
    "name": "bookmanagementAPIrequester_1.0.0",    
    "version": "1.0.0",     
    "description": "Multiple operations on book management",     
    "status": "Started",    
    "apiRequesterUrl": "http://localhost:9080/zosConnect/apiRequesters/bookmanagementAPIrequester_1.0.0",    
    "connection": "bookmanagementAPIrequesterConn"
}
Errors
The following errors can occur.

400 Bad request
Invalid or missing API requester archive.

409 Conflict
A z/OS Connect API requester must be stopped before it can be updated.

415 Unsupported Media Type
Content-Type is not application/zip.

500 Internal Server Error
Server issue, might require administrator intervention.

503 Service Unavailable 
A z/OS Connect API requester must complete all outstanding requests before it can 
     be updated.