MDMCS MDREST4i Interface
Published August 14, 2025
Overall Setup Steps
Step | Actions |
---|---|
1 | Add library MDRST to any MDCMS level JobD where an API or Consumer will be compiled/promoted. |
2 | In SDK Documenter, Create an Environment in SDK Documenter for each MDCMS level. |
3 | Create an MDCMS attribute (e.g., OAPISDK ) for type *DUMMY for each level/environment where APIs/Consumers will be promoted to. |
4 | Add the command MDRCPYOAPI as a command to each MDCMS level/attribute. |
5 | In the SDK Console → Edit Site dialog (1) edit the following: |
6 | In MDCMS Values, select Object Required. |
7 | In MDCMS Base, add the host name of the MDCMS REST API server |
8 | In MDCMS API Token add your token from the MDSEC Token system. |
9 | In OAPI Attribute add the MDCMS Attribute you created for OAPI promotions. |
SDK Data Architecture and Flow
More info on how MDRest4i SDK stores and process the OAPI specification
Create an Environment in SDK Documenter
Step | Action |
---|---|
1 | ![]() http://youribmi:yourport/docu/ , or from the "Developer Portal" link in the header of the SDK Web UI. |
2 | Click the user avatar ![]() |
3 | ![]() This makes the Installation Details tab appear for a Specification (values are added by MDCMS when the OAPI is promoted). |
4 | ![]() |
5 | ![]() |
6 | ![]() REFFUID This value is auto created as you type the environment name above. Note/copy and save this for the next step in MDCMS when adding the MDRCPYOAPI command to the MDCMS Attribute. Seq. Number: This value sets the order that an environment will be listed in the left hand Documenter menu Select Add to save the Environment details. |
Create MDCMS Attribute for OAPI Specifications
In MDCMS, add an Attribute:
Parameter | Description |
---|---|
Application | As per your current setup Example: APIS |
Level | As per your current setup Example: 100 |
Object Type | *DUMMY |
Object Attribute | Any appropriate name Note: This attribute is entered in the OAPI Attribute field of the SDK Console Setup for MDCMS Interface Example: OAPISDK |
Description | Any suitable description Example: `MDRest4i OAPI Docs |
Ignore Dependencies | Y |
Add Attribute Command MDRCPYOAPI
Take option "C" to add a command to the Attribute created above.
CMCCMST T86 Dev/Test 25.08.25
SCRN2 MD Default Command Maintenance 09:05:33
Appl/Lvl.: APIS 100 Desc: Promote from SDK to DOCU ENV
Attribute: OAPISDK *gen*, *RFP, *ALL Run for Modifications: Y Y/N
Type.....: 2 Pre-Installation Recompiles...: Y Y/N
Sequence.: Deletes......: Y Y/N
Frequency: O O=Object, R=RFP Updates......: Y Y/N
User Prof: *USER Ignore Errors........: N Y/N
Obj Type.: *ANY *ANY, type Keep MD Libs in Libl.: Y Y/N
Spec Def.: Y Y=Run if specific def exists
Command
MDRCPYOAPI ENTITY(##OBJNAM##) USER(##OBJREQ##) FROM(*SDK) TO('APIS-100')
REMOVE(Y) OVRWRT(Y) INSTDT('##RFPIND##') RFPNBR(##RFPNBR##) APP(##APPLIC##)
LVL(##PROLVL##) PROJ(##PROJID##) TASK(##TASKID##) STASK(##STSKID##) INST(*DFT)
LOCT(DEV)
_______________________________________________________________________________
_______________________________________________________________________________
F4=Browse F7=Insert Placeholder F12=Previous
Use command MDRCPYOAPI
– MDRest4i Copy OAPI Specs to copy data between the SDK tables used to store the OAPI specs.
MDRCPYOAPI Parameter Reference
Parameter | MDCMS Wildcard | Description |
---|---|---|
ENTITY | ##OBJNAM## | The name given to the specification by the user with spaces. Example: a-client-list |
USER | ##OBJREQ## | Supply the username of the user who created the specification in the SDK, e.g., STUART . |
FROM | na | Where the OAPI specification record is to be copied from. Either *SDK - When the OAPI is to be copied from the users SDK sandbox (Specs that are in the users Specification List in the SDK UI) or <environment-name> Documenter Environment where the OAPI is to be copied from. Such as when an OAPI/API is being promoted between MDCMS APPL/LVL environments e.g. APIS-100 ⇢ APIS-200 |
TO | na | Where the OAPI specification record is to be copied to. Either *SDK - When the OAPI is to be copied to the users SDK sandbox (Specs that are in the users Specification List in the SDK UI) or <environment-name> Documenter Environment where the OAPI is to be copied to. Such as when an OAPI/API is being promoted between MDCMS APPL/LVL environments e.g. APIS-100 ⇢ APIS-200 |
REMOVE | na | This specifies whether to remove the OAPI Specification from the "FROM" record. Y = Remove the source record. N = Leave the source record in place |
OVRWRT | na | This specifies whether to overwrite an existing OAPI Specification in the "TO" record. Y = Overwrite the destination record. N = Leave the destination record in place and fail the promotion if the record already exists |
INSTDT | ##RFPIND## | Supply the date, e.g., 30.01.2023 . NOTE: This must be in single quotes if separators are used, such as when MDCMS replaces values using replacement values such as '##RFPIND##' |
RFP number | ##RFPNBR## | Supply the RFP number, e.g., 333333 . |
App | ##APPLIC## | Supply the app name, e.g., REST . |
Level | ##PROLVL## | Supply the level number, e.g., 300 . |
Project | ##PROJID## | Supply the project name, e.g., RESTAPI . |
Task | ##TASKID## | Supply the task number, e.g., 1 . |
Subtask | ##STSKID## | Supply the subtask number, e.g., 2 . |
Instance | na | Supply the MDCMS instance name, e.g., T84 , or *DFT if using the default MDCMS instance (no suffix). |
Location | na | Supply the location name, e.g., DEV . |
MDRCPYOAPI - MDRest4i Copy OAPI Specs
This command can be used manually from an IBM i command line, execute:
MDRest4i Copy OAPI Specs (MDRCPYOAPI)
Type choices, press Enter.
Entity Name: (Name) . . . . . . ENTITY > apiname
User Name: . . . . . . . . . . . USER > STUART
Copy From: (*SDK, Name) . . . FROM > *SDK
Copy To: (*SDK, Name) . . . TO > 'APIS-100'
Remove: Y/N . . . . . . . . . . REMOVE > Y
Overwrite: Y/N . . . . . . . . . OVRWRT N
Install date: . . . . . . . . . INSTDT > '20.08.2025'
RFP number: . . . . . . . . . . RFPNBR > 0120021
App: . . . . . . . . . . . . . . APP > APIS
Lvl: . . . . . . . . . . . . . . LVL > 100
Project: . . . . . . . . . . . . PROJ
Task: . . . . . . . . . . . . . TASK
Subtask: . . . . . . . . . . . . STASK
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
See MDRCPYOAPI Parameter Reference for details
SDK Console Setup for MDCMS Interface
- In the SDK Console UI, select Console Admin.
- Click Edit Site.
- In MDCMS Values, select Object Required.
- In MDCMS Base, add the host name of the MDCMS REST API server
- In MDCMS API Token add your token from the MDSEC Token system.
- In OAPI Attribute add the MDCMS Attribute you created for OAPI promotions.
MDCMS Promotion Steps
Simple Step-by-Step
- Create the API in the SDK Web UI.
- Save the OAPI document/specification in the SDK.
- An optional (1) step: To produce API Business documentation, select Publish from the Installation Details tab in MDRest4i Documenter.
- From the Generate tab of the SDK Web UI, select Submit Object Request.
- Specify options and submit. An object request will be created for the API/Consumer source and the OAPI specification.
- Promote as necessary and review the promoted OAPI specification in MDRest4i Documenter.
If the OAPI is published to the SDK Documnetr/Developer Portal, the MDRCPYOAPI.OVRWRT parameter should be set to "Y", when running the RFP installation or in the Attribute command setup. This will avoid losing any changes made to the business documentation.
MDCMS Object Request Interface
Parameter Description
Input | Description |
---|---|
Application | The ID of the target application for the object to be selected from the dropdown list |
Level | A level number of the selected application that allows check-outs to be selected from the dropdown list |
Object Type | The System or MDCMS Object Type code for the Object |
Attribute | The MDCMS Attribute code that identifies the behaviour and target locations for the requested object |
Object Name | The name of the object to be requested |
Project | 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 | Specifies an existing, active Task number. Omit or set to 0 if the request would be assigned directly to the Project. |
Subtask | Specifies an existing, active Subtask number. Omit or set to 0 if the request should be assigned directly to the Project or Task |
Assign Request to RFP | 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. |
Existing RFP number | Specifies the RFP to assign to the Request. |
Description of New RFP | Description of New RFP |
MDCMS, the MidRange Dynamic Change Management System can be integrated with MDRest4i-SDK-Console.
Swagger Extension x-mdcms
{
"xmdcms": {
"object": {
"vref": "*MDR",
"user": "STUART",
"appl": "APIS",
"lvl": "100",
"objt": "*PGM",
"attr": "SQLRPGLE",
"objn": "PULSEAPI",
"folb": "mdrstt14",
"fsfl": "QTSTSRC",
"proj": "APIDEV",
"task": "0",
"stsk": "0",
"arfp": "*AUTO",
"rfp": "",
"rfpd": "sams AI test",
"fslb": "MDRTST14",
"response": {
"rtn": {
"sev": "10",
"msg": "Request created for PULSEAPI into RFP 120036"
}
}
},
"OAPI": {
"appl": "APIS",
"lvl": "100",
"objt": "*DUMMY",
"attr": "OAPISDK",
"objn": "TestAPI",
"task": "0",
"stsk": "0",
"user": "STUART",
"proj": "APIDEV",
"arfp": "*YES",
"rfp": "120036",
"rfpd": "",
"response": {
"rtn": {
"sev": "10",
"msg": "Request created for TestAPI into RFP 120036"
}
}
},
"MDRSTCFG": {
"appl": "APIS",
"lvl": "100",
"objt": "*DTAGRP",
"attr": "MDRSTCFG",
"objn": "test-api",
"task": "0",
"stsk": "0",
"user": "STUART",
"proj": "APIDEV",
"arfp": "*YES",
"rfp": "120036",
"rfpd": "",
"response": {
"rtn": {
"sev": "10",
"msg": "Request created for TestAPI into RFP 120036"
}
}
}
}
}
x-mdcms:
objn: getclnt
appl: REST
user: rituk
vref: '*LXR'
lvl: '300'
objt: '*PGM'
attr: SQLRPGLE
folb: MDRTUTLIB
fsfl: QDEMOSRC
proj: RESTAPI
task: '1'
stsk: '0'
arfp: '*YES'
rfp: '360082'
rfpd: Test
fslb: MDRTUTLIB
response:
rtn:
sev: '20'
msg: Existing Object Request in RFP 360082 will be usedSwagger Extension x-mdcmsopai
Swagger Extension x-mdcmsoapi
x-mdcmsopai:
appl: REST
lvl: '300'
objt: '*IFS'
attr: OAPI
folb: /www/mdrstt12/specs/cons/rituk
objn: Provider-API-Get-Clients-V1211.json
task: '1'
user: rituk
proj: RESTAPI
arfp: '*YES'
rfpd: Test
response:
rtn:
sev: '20'
msg: Existing Object Request in RFP 360082 will be used
Importing Promoted Specifications to SDK
An MDCMS Level can be mapped to an MDRest4i Documenter Environment. The link is logical by name/coded reference designed by the user. In this way an OAPI specification stored in an MDRDPAGE record, can be mapped to a specific SCM APPLICATION/LEVEL(environment).
Once the user creates the OAPI spec and generates the RPG code in the SDK UI, they can submit an object request to MDCMS. The interface adds an object request for both the generated RPG source code and the OpenAPI specification.
From then on, MDCMS controls promotion of both artefact via the RFP.
-
The first promotion can remove the OAPI specification from the SDK user’s OAPI records, and moves it to the SDK Documenter Envirnment in MDRDPAGE on the same IBM i server. Each MDRest4i Documenter environment has its own MDRDPAGE record for saving OAPI specs and the generated HTML documentation.
-
When the OAPI spec and source code are promoted to the next MDCMS level by an RFP, the OAPI spec is removed from the previous level and added to the next MDCMS level, which has an MDRest4i Documenter Environment associated with it (via the MDCMS Attribute).
-
To checkout/request object for an existing OAPI specification not in an SDK user’s development folder (i.e., it resides in another Documenter Environment), the user can use Import from Developer Portal in the MDRest4i SDK. The cycle can then begin again.