Skip to content

Object Request REST API

Published: 2024-05-15

Resource Name

/object-request

POST

Create an Object Request (check-out) in MDCMS.

Request

Path parameters

none

Body parameters

appl  Required

string

The ID of the target application for the object

lvl  Required

integer

A level number of the application that allows check-outs

objt  Required

string

The System or MDCMS Object Type code for the Object

attr  Required

string

The MDCMS Attribute code that identifies the behavior and target locations for the requested object

objn  Required

string

The name of the object to be requested

rpth

string

Specifies the relative portion of an IFS path that will be deployed with the object. For example, if the *IFS attribute has a target fixed directory defined as /srv/dev and this object should be deployed to srv/dev/app1/dist, then the value of RPTH should be /app1/dist.

srcn

string

Specifies the name of the Source Member or IFS Source File to be requested. If a value isn't passed for the parameter, then the source name will be set to the same as the object name. This parameter is ignored if the attribute is defined as having no source.

rsn

string

The reason (or purpose) of the object request. If a value isn't passed for the parameter, then *MIGRATE will be used.

*MIGRATE - source and/or object will be migrated into the target application level *DELETE - an existing object will be deleted *RECOMPILE - an object will be recompiled based on the source already in the environment *UPDATE - update an ILE program or Service Program to re-bind the current modules and service programs to the program.

user

string

The user (developer) to assign to the object request If a value isn't passed for the parameter, then the current user of the job (QTMHHTTP) will be used.

folb

string

Specifies the library or IFS path that contains the object to be migrated to the specified level. The library should be a developer or team library that is not managed by MDCMS. If the attribute contains source only, then enter the library/path containing the source. If the object resides in IFS, provide the entire directory path starting with /. If a value isn't passed for the parameter, then the library will be set to the name of the user.

If the object is of type *IFS or *REMOTE and the POST request includes an attached file of the same name as the objn parameter, the attached file will be automatically copied to the path indicated on the folb parameter for eventual deployment on an RFP. A CURL example of attaching a file to the REST request is provided at the bottom of this page.

fslb

string

Specifies the library or IFS path that contains the source to be migrated to the specified level. The library should be a developer or team library that is not managed by MDCMS. If a value isn't passed for the parameter, then the object library (folb) will be used.

If the source file is of type *IFS and the POST request includes an attached file of the same name as the srcn parameter, the attached file will be automatically copied to the path indicated on the fslb parameter for eventual deployment on an RFP. A CURL example of attaching a file to the REST request is provided at the bottom of this page.

fsfl

string

Specifies the source file containing the source member to be migrated.  This parameter is ignored if the attribute is defined as having no source. If a value isn't passed for the parameter, then the name of the source file will be set to the source file defined on the attribute.

copy

string

Specifies if the source or object should be copied from the target environment to the library from which to be migrated from. This parameter is only considered for Reason *MIGRATE. If the attribute defines a source and object location, only the source will be copied. If the source or object already exists in the From Library, it will not be replaced by the source or object in the target environment.

*NO (default) - the source or object will be otherwise placed in the From Library prior to migration. *YES - MDCMS will copy the Source or Object from the Target Environment to the From Library, if it doesn't already exist in the From Library.

proj

string

Specifies the Project to assign to the Request. The project, if entered, must already exist and be in an open status. If the project is not yet authorized, then the user must have MDSEC authority to authorize the Project and then MDCMS will do so automatically.

task  

integer

Specifies an existing, active Task number. Omit or set to 0 if the request should be assigned directly to the Project.

stsk  

integer

Specifies an existing, active Subtask number. Omit or set to 0 if the request should be assigned directly to the Project or Task

arfp

string

Specifies if the request should be immediately assigned to an RFP and the method of determining the RFP.

*NO (default) - the request will be created without being assigned to an RFP. *YES - The request will be assigned to the RFP number based on parameter RFP. *AUTO - MDCMS searches for an open RFP matching the Application, Level, User and Description parameter values. If an RFP is found, the Request will be assigned to that RFP. If an RFP is not found, a new RFP will be created. *NEW - A new RFP will be created for the Application, Level, User and Description parameter values.

rfp  

integer

Specifies the RFP to assign to the Request. Will only be used if parameter ARFP is set to *YES.

rfpd

string

The description to be used for a new RFP or to search for an existing RFP. Will only be used if parameter ARFP is *AUTO or *NEW.

creq

string

If a level exists to migrate after this target level, this parameter specifies if the object requests should be generated for that level once this level's RFP is complete. This parameter will only be applied to the RFP if it is created during the processing of this command.

*YES (default) or *NO

areq

string

If a level exists to migrate after this target level, this parameter specifies if the generated object requests should be assigned to an RFP. This parameter will only be applied to the RFP if it is created during the processing of this command.

*YES (default)

*NO *MANUAL - Requests for the next level will be assigned to a new RFP, but the RFP will not be automatically submitted, even if the next level is set to automatically submit RFPs by default.

sreq

string

If distribution levels are defined for this level, this parameter specifies if the RFP should be placed in the Send List. This parameter will only be applied to the RFP if it is created during the processing of this command.

*YES (default) or *NO

lock

string

Specifies whether or not the Request will be placed in Locked status

*YES (default) or *NO

csqo

integer

Specifies the sequence for compiling (lowest first) for objects in same RFP that have the same primary sort sequence in order to handle potential dependency issues.

data

string

Specifies the origin of the data that should be copied into a new or modified physical file/SQL Table.

*SAME (default) - The data is mapped from the old format of the modified file to the new format of the file of the same name/target library. *MIGRATE - The data is migrated with the file from the check-out location to the target library. *NONE - The data is not migrated. The new file format will be empty. *NONE is required for a logical file if it is replacing a physical file. character value - specify the system or SQL name of the file to copy from when deploying the requested file

dmbr

string

Specifies the member(s) to copy to the new version of a physical file/SQL Table or to migrate from the prior environment.

*ALL (default) - all existing members are included for the copy *FIRST - The first member in the originating file is copied. Any other members are omitted. character value - specify the specific name of the member to be copied from the originating file. Any other members are omitted.

rpgm

string

Specifies if MDRapid should be used to map the data from the old version of a file to the new version.

*DEFAULT (default) - MDRapid will be used if the number of records in the file is at least the number in the MDRapid template for the attribute. Otherwise not. *NO - MDRapid will not be used *YES - MDRapid will be used

rjrn

string

Specifies if the new version of a table or access path should have the journaling attributes applied to it that belonged to the file that it replaced.

*DFT (default) - The default option defined for the Application is used *NO - Journaling will not be reapplied automatically *YES - Journaling will be reapplied automatically

rcst

string

Specifies if the new version of a table should have the constraints applied to it that belonged to the file that it replaced.

*DFT (default) - The default option defined for the Application is used *NO - constraints will not be reapplied automatically *YES - constraints will be reapplied automatically

rtrg

string

Specifies if the new version of a table should have the triggers applied to it that belonged to the file that it replaced.

*DFT (default) - The default option defined for the Application is used *NO - triggers will not be reapplied automatically *YES - triggers will be reapplied automatically

rlfm

string

Specifies if the new version of a logical file should have the members added to it that belonged to the logical file that it replaced.

*DFT (default) - The default option defined for the Application is used *NO - members will not be reapplied to the logical file automatically *YES - members will be reapplied to the logical file automatically

dir

string

Specifies whether or not the Request of an object of type *IFS is a directory.

*NO - not a directory (is treated as a file) *YES - is a directory

vref

string

Optional Vendor Generated Identifier in order for an external process to easily identify the transaction record in the MDDAREQ table where each object-request transaction is logged.

pipe

string

If a pipeline server job should be notified of RFP activity for the RFP containing this object request, the Pipeline Server ID defined in MDOpen can be passed.  The pipa and tkey parameters will also need to be passed.

pipa

string

If a pipeline server job should be notified of RFP activity for the RFP containing this object request, the MDCMS attribute defined for a *PIPE object should be passed. MDCMS will then generate a *PIPE object request and assign it to the same RFP as the primary object. The pipe and tkey parameters will also need to be passed.

tkey

string

The key that uniquely identifies the pipeline job that should be updated.  This is typically a one-time build number and is used to notify the Pipeline server as the RFP proceeds. The pipe and pipa parameters will also need to be passed.

Example request body:

{ "appl":"TEST", "lvl":"10", "objt":"*PGM", "attr":"SQLRPGLE", "objn":"MYNEWPGM", "user":"MMORGAN", "rsn":"*migrate", "folb":"MMORGAN13", "fsfl":"QRPGLESRC", "proj":"DEMOCH", "task":"2", "stsk":"3", "arfp":"*YES", "rfp":"1709", "vref":"ep1234" }

Example CURL request including an attached file to be included with the object request. Variable MD_REQ in this example is the json body containing the object-request parameters and variable MDCMS_URI would be the URL string of the object-request resource.

sh "curl -v POST -H \'Expect:\' -H \'Content-Type: multipart/mixed\' -F \'payload=${MD_REQ};type=application/json\' -F file=@sample.war ${MDCMS_URI}"

Response

Body parameters

The response provides a rtn structure with the following parameters:

sev  

string

The message severity

10 - processed without errors or warnings 20 - processed, but warnings occurred 30 - did not process successfully due to errors

msg  

string

The message text

Example:

{"rtn": {
   "sev": "10",
   "msg": "Request created for MYNEWPGM into RFP 1709"
}}