Add Asset to Module
Method / path: POST /api/v1/modules/{id}/assets
Prerequisites
- The caller must provide a module id.
Authorization
- API key (via the
X-API-KEYheader).
Parameters
Path Parameters
| Field name | Description | Format |
|---|---|---|
| id | Module ID | UUID |
Request Body
| Field name | Description | Format |
|---|---|---|
| profile | Profile name | String |
| fetchRequests | Fetch request objects list | Array |
Response Body
| Field name | Description | Format |
|---|---|---|
| ids | List of created asset IDs | Array |
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 |
Examples
mainframe-rpc
```json
{
"fetchRequests": [
{
"sourceMode": "upload",
"assetName": "hello",
"programPath": "HELLO",
"sources": {
"HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO."
},
"sourcePath": "",
"parser": "COBOL"
}
]
}
json
{
"ids": [
"00000000-0000-0000-0000-000000001111"
]
}
```
as400-rpc
```json
{
"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
{
"ids": [
"00000000-0000-0000-0000-000000002222"
]
}
```
ims-rpc
```json
{
"fetchRequests": [
{
"sourceMode": "upload",
"assetName": "hello",
"programPath": "HELLO",
"sources": {
"HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO."
},
"sourcePath": "",
"parser": "COBOL"
}
]
}
json
{
"ids": [
"00000000-0000-0000-0000-000000003333"
]
}
```