Original Message:
Sent: Fri April 21, 2023 11:11 AM
From: RICHARD CROSS
Subject: User creation via command line
Not quite everything is available as a REST API yet. Each new release has tended to add more and any new UI elements tend to automatically come with equivalent REST APIs. You've also got the older XAPIs which some customers have used to automate config tasks.
You can automate import/export e.g. using the import and export services (https://www.ibm.com/docs/en/b2b-integrator/6.1.2?topic=l-import-service) in a BP, and then using the workflowlauncher to run the BP from the command line.
Hopefully someone watching this forum might have some examples they can share.
Best regards,
Richard.
------------------------------
RICHARD CROSS
Original Message:
Sent: Mon April 03, 2023 10:46 AM
From: Nicholas Murn
Subject: User creation via command line
I was able to create users with the above curl commands successfully, thank you so much!
To piggyback off my original question, is it possible to do everything in the GUI via rest api or are there things that still require manually doing via the UI?
For example, to do an import / export from Resource Manager, I didn't see anything in the REST interface for that...is that possible to do via any scripts in the ../bin dir?
Thanks again!
------------------------------
Nicholas Murn
Lead Consultant
Eliassen Group
Rochester VT
585-270-1330
Original Message:
Sent: Wed February 15, 2023 09:02 AM
From: Emiliano Pacelli
Subject: User creation via command line
Hi Nick,
please find here an example on how to create a user with some groups and permissions. please change values underlined and remove unnecessarygroups/permissions.
/**** Postman ******/
https://{{ip_address}}:{{port}}/B2BAPIs/svc/useraccounts/
{
"authenticationType": {
"code": "Local",
"display": "Local"
},
"givenName": "Test Operator",
"groups": [
{
"name": "Trading Profiles"
},
{
"name": "Deployment"
},
{
"name": "Business Process"
},
{
"name": "MAILBOX"
},
{
"name": "SERVICES"
},
{
"name": "Mailbox Administrators"
},
{
"name": "MAPS"
},
{
"name": "DEPLOYMENT"
},
{
"name": "EBICS Operators"
},
{
"name": "BPMONITOR"
},
{
"name": "EBICS Administrators"
}
],
"permissions": [
{
"name": "UI Logs"
},
{
"name": "PGP Public Key"
},
{
"name": "PGP Sponsor Manager"
},
{
"name": "UI Licenses"
},
{
"name": "PGP Server Manager"
},
{
"name": "OdetteFTPQueue"
},
{
"name": "UI Reports"
},
{
"name": "PGP Secret Key"
},
{
"name": "Troubleshooter"
},
{
"name": "OdetteFTPCLID"
},
{
"name": "UI Lock Manager"
},
{
"name": "PGP Partner Manager"
},
{
"name": "UI Notify"
},
{
"name": "UI AS3 Trading Profile Setup"
},
{
"name": "Admin Web App Permission"
},
{
"name": "UI Cluster"
},
{
"name": "EBICS Client UI APPLICATION"
}
],
"preferredLanguage": {
"code": "en",
"display": "English"
},
"sessionTimeout": 0,
"surname": "test",
"password": "password",
"userId": "user",
"userIdentity": "DEFAULT Organization"
}
/**** cURL ******/
curl --location --request POST 'https://{{ip_address}}:{{port}}/B2BAPIs/svc/useraccounts/' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic xxxxxx=' \
--data-raw '{
"authenticationType": {
"code": "Local",
"display": "Local"
},
"givenName": "Test Operator",
"groups": [
{
"name": "Trading Profiles"
},
{
"name": "Deployment"
},
{
"name": "Business Process"
},
{
"name": "MAILBOX"
},
{
"name": "SERVICES"
},
{
"name": "Mailbox Administrators"
},
{
"name": "MAPS"
},
{
"name": "DEPLOYMENT"
},
{
"name": "EBICS Operators"
},
{
"name": "BPMONITOR"
},
{
"name": "EBICS Administrators"
}
],
"permissions": [
{
"name": "UI Logs"
},
{
"name": "PGP Public Key"
},
{
"name": "PGP Sponsor Manager"
},
{
"name": "UI Licenses"
},
{
"name": "PGP Server Manager"
},
{
"name": "OdetteFTPQueue"
},
{
"name": "UI Reports"
},
{
"name": "PGP Secret Key"
},
{
"name": "Troubleshooter"
},
{
"name": "OdetteFTPCLID"
},
{
"name": "UI Lock Manager"
},
{
"name": "PGP Partner Manager"
},
{
"name": "UI Notify"
},
{
"name": "UI AS3 Trading Profile Setup"
},
{
"name": "Admin Web App Permission"
},
{
"name": "UI Cluster"
},
{
"name": "EBICS Client UI APPLICATION"
}
],
"preferredLanguage": {
"code": "en",
"display": "English"
},
"sessionTimeout": 0,
"surname": "test",
"password": "password",
"userId": "user",
"userIdentity": "DEFAULT Organization"
}
'
------------------------------
Emiliano Pacelli
Original Message:
Sent: Tue February 14, 2023 10:40 AM
From: Nicholas Murn
Subject: User creation via command line
Richard,
Awesome! I knew there was a way but still learning my way around the product. Thanks for the response.
Nick
------------------------------
Nicholas Murn
Lead Consultant
Eliassen Group
Rochester VT
585-270-1330
Original Message:
Sent: Tue February 14, 2023 06:00 AM
From: RICHARD CROSS
Subject: User creation via command line
Hi Nick,
You can do it via REST: https://www.ibm.com/docs/en/b2b-integrator/6.1.2?topic=cbra-b2b-rest-apis-available-in-sterling-b2b-integrator
So you could call curl from the command line to send the REST requests.
Regards,
Richard.
------------------------------
RICHARD CROSS
Original Message:
Sent: Mon February 13, 2023 09:57 AM
From: Nicholas Murn
Subject: User creation via command line
Hi all,
Is it possible to create a user from the command line instead of using the b2bi UI and clicking through the prompts / pages? I was doing some searching and haven't really found any commands to do so. I'm new to b2bi so if it's possible to do it's a very high possibility that I looked past it.
For clarification I'm talking about creating a new user from Sterling B2B Integrator UI --> Accounts --> User Accounts --> "Create a new Account / Go" screen.
Thanks in advance!
Nick
------------------------------
Nicholas Murn
Leveraging Techology
Rochester NY
585-454-4250 x 116
------------------------------
#SupplyChain
#B2BIntegration