post
https://api.ol-hub.com/backend/api/v1/modules//assets
The add asset to module API sends a POST request to insert an asset.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
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
{
"fetchRequests": [
{
"sourceMode": "upload",
"assetName": "hello",
"programPath": "HELLO",
"sources": {
"HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO."
},
"sourcePath": "",
"parser": "COBOL"
}
]
}{
"ids": [
"00000000-0000-0000-0000-000000001111"
]
}{
"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"
}
]
}{
"ids": [
"00000000-0000-0000-0000-000000002222"
]
}{
"fetchRequests": [
{
"sourceMode": "upload",
"assetName": "hello",
"programPath": "HELLO",
"sources": {
"HELLO.cbl": " IDENTIFICATION DIVISION.\r\n PROGRAM-ID. HELLO."
},
"sourcePath": "",
"parser": "COBOL"
}
]
}{
"ids": [
"00000000-0000-0000-0000-000000003333"
]
}
