add asset to module
Prerequisites
- The caller must provide a module id.
Authorization
- API key (via the
X-API-KEYheader).
Parameters
<Accordion title="Path Parameters"> | Field name | Description | Format | | :--------- | :---------- | :----- | | id | Module ID | UUID | </Accordion>
<Accordion title="Request Body"> | Field name | Description | Format | | :------------ | :----------------------------------------------------- | :----- | | **profile** | Profile name | String | | fetchRequests | [Fetch request objects](#fetch-request-structure) list | Array | </Accordion>
<Accordion title="Response Body"> | Field name | Description | Format | | :--------- | :------------------------ | :----- | | ids | List of created asset IDs | Array | </Accordion>
<Accordion title="Fetch Request Structure"> <div id="fetch-request-structure"> | Field name | Description | Format | | :---------- | :----------------------------------- | :----- | | assetName | The name of the asset | String | | programPath | The path to the program | String | | sourceMode | The source retrieval mode | String | | sourcePath | The source file path | String | | sources | Source file name-to-content mapping | Map | | parser | The source parser type | String | </div> </Accordion>
Examples
<Tabs> <Tab title="mainframe-rpc"> ```json Request { "fetchRequests": [ { "sourceMode": "upload", "assetName": "hello", "programPath": "HELLO", "sources": { "HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO." }, "sourcePath": "", "parser": "COBOL" } ] } ``` ```json Response { "ids": [ "00000000-0000-0000-0000-000000001111" ] } ``` </Tab>
<Tab title="as400-rpc"> ```json Request { "fetchRequests": [ { "sourceMode": "upload", "assetName": "hello", "programPath": "/QSYS.LIB/RMR2L1.LIB/HELLO.PGM", "sources": { "HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO." }, "sourcePath": "", "parser": "COBOL" } ] } ``` ```json Response { "ids": [ "00000000-0000-0000-0000-000000002222" ] } ``` </Tab>
<Tab title="ims-rpc"> ```json Request { "fetchRequests": [ { "sourceMode": "upload", "assetName": "hello", "programPath": "HELLO", "sources": { "HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO." }, "sourcePath": "", "parser": "COBOL" } ] } ``` ```json Response { "ids": [ "00000000-0000-0000-0000-000000003333" ] } ``` </Tab> </Tabs>