Skip to content

Management resources

Related guide: Manage resources. The full contract of each endpoint is in the OpenAPI specification.

Conventions

ItemRule
IdentificationEntities are accessed by ID in the path: /id/{ID}.
BodyJSON, with the Content-Type: application/json header exactly like this, without charset.
CreationPOST on the collection path, with the entity without the ID field.
UpdatePUT on the entity path, with the complete entity. The CONFIG_TXT sent replaces the stored one entirely.
Sensitive fieldsPasswords and secrets are returned masked (****). When updating, send the masked value to keep the stored value.
AccessThe operator sees only the entities related to their groups.

Entity format

Configuration entities share the same envelope:

FieldDescription
IDIdentifier. Omitted on creation.
INSTANCE_ID or USER_IDOwner entity (instance or user), when applicable.
NAMEName. Required.
DESCRIPTIONDescription.
CONFIG_TXTEntity configuration, in the same format used by the Riversoft Console Portal.
CREATED, MODIFIEDCreation and last modification dates.
EXTRA_TXTAdditional data.

Tip

The simplest way to create a new entity is to get a similar existing one, change NAME and the required fields, and send it without ID.

CONFIG_TXT structure

CONFIG_TXT is a JSON object, divided into sections. All of them have the Entity section, with the entity type (Name) and the structure version (Version = 2). The fields of each section are in the Cfg* schemas of the OpenAPI specification.

EntitySchemaSections
InstanceCfgInstanceAuthentication (user authentication, MFA, password policies and LDAP), Log (log database and filters), Startup (service, directories, sessions, external lock and SSO providers)
UserCfgUserGeneral, Token, Net1 and Net2 (main and alternative network), and one section per protocol: OFTP, SFTP, FTP, S3, AzBlob, OciBlob, GcpBlob, WhatsApp, AS2, WebHook
Network serviceCfgServiceService, Net1, and one section per type: OFTP, SFTP, API, WhatsApp, AS2, WebHook, Monitor
ScheduleCfgScheduleSchedule
File type (global or user)CfgFileTypeFileConf
RoutingCfgRoutingRules.General (scan) and Rules.FileMatching[] (rules, with General, Filename, Copy and Backup)
Operator—Operator, Relations.Groups
Group—Permissions, Relations
API registration—Monitor, passwordPolicies, ssoProviders, enable2FA, TLS and SSO

Things to watch when updating:

  • PUT replaces the whole CONFIG_TXT. Omitted fields go back to empty or zero. Get the entity, change the fields and send the complete object.
  • Unknown fields are ignored without error. Check the field names in the schema.
  • Sensitive fields are returned masked. Sending the masked value back keeps the stored value.

Note

The schemas match the stcpcfgifacetypes-go v1.3.2 configuration module, used by Riversoft STCP Gemini API 3.10.0.

Coded values

Some CONFIG_TXT fields use codes. When the field accepts a combination, the value is the sum of the codes.

FieldValues
User: General.TransferProtocol0 disabled, 1 OFTP, 2 SFTP, 4 Amazon S3, 5 Azure Blob Storage, 6 OCI Object Storage, 7 Google Cloud Storage, 8 WhatsApp, 9 FTP, 10 AS2, 11 Webhook
User: General.TransferProtocolInProtocols accepted in the inbound connection: sum of 2^protocol. Example: OFTP and SFTP = 2 + 4 = 6
User: General.AuthMFAMethod0 follows the instance; 128 disables MFA for the user
User: InitModeBoth, Initiator, Responder
User: ModeBoth, Sender, Receiver
User: *ProxyType0 SOCKS4, 1 SOCKS5, 2 HTTP, 3 HTTPS, 4 FTP
User: AS2.MDNOptions (sum)1 enabled, 2 signed, 4 asynchronous, 8 encrypted
User: SendDocumentOptions and RequiredDocumentOptions (sum)1 signed (multipart), 2 signed, 4 encrypted, 8 compressed
User: AuthMode (AS2 and Webhook)0 none, 1 Basic, 2 Bearer
User: Net1.WhatsAppDownloadMode0 Meta document ID, 1 Meta link, 2 secure link without password, 3 secure link with password
Service: Service.ServiceType0 OFTP, 1 API, 2 supervision (DirectLink), 3 SFTP, 4 supervision (Gemini), 5 WhatsApp, 6 AS2, 7 Webhook
Service: API.AuthMode (sum)1 Basic, 2 Bearer, 4 token exchange (JWT), 8 password grant. 0 accepts all. The Bearer token is always required on routes that are not authentication routes.
Schedule: Schedule.Type (sum)1 receiving, 2 sending, 4 command, 8 optimized sending, 128 Riversoft STCP DirectLink
Schedule: Schedule.Mode0 date, 1 date with interval, 2 interval
File type: FileConf.FileMatch0 default, 1 prefix/suffix, 2 file name, 3 regular expression
File type: FileConf.FileDirection0 both, 1 sending disabled, 2 receiving disabled
Instance: Authentication.AuthType0 operating system, 1 STCP, 2 RSA SecurID, 3 LDAP
Instance: Authentication.AuthMFAMethod0 disabled, 1 authenticator app (TOTP), 2 code by email, 3 code by SMS
Instance: Authentication.AuthPolicyPswdComplex and API registration: passwordPolicies.complexity (sum)1 lowercase, 2 uppercase, 4 digit, 8 symbol (15 = all)
Instance: Startup.ExternalLockTypein-memory, filesystem, redis
Instance: Startup.OSTypeLINUX, WINNT, WIN32, MACOS
SSO provider: ssoTypeoauth2, saml2, jwt, ldap

Responses

Operation200 response
Query (GET){"status": 200, "field": "<entity>", "data": [ ... ]}
Creation and update (POST, PUT){"data": "<entity name>", "field": "<entity>"}
Deletion (DELETE){"data": "<Entity> deleted with success", "field": "<entity>"}

Errors follow the format described in Response codes.

Configuration (/stcpcore/v2)

ResourcePathPermission
Instances/instancesstcpcore.instance
Instances and their users/instances/membersstcpcore.instance = 15
Users/instances/id/{instanceID}/usersstcpcore.user
Network services/instances/id/{instanceID}/servicesstcpcore.service
Schedules/instances/id/{instanceID}/schedulesstcpcore.schedule
Global file types/instances/id/{instanceID}/ftypesglobalstcpcore.filetypeglobal
User file types/instances/id/{instanceID}/users/id/{userID}/filetypesstcpcore.filetype
Routings (Riversoft STCP Gemini Rename)/instances/id/{instanceID}/routingstcpcore.routing

File types also have GET .../check?filename=<name>, which returns the types whose regular expression matches the given name. Routings can be queried by name at GET .../routing/name/{name}.

Administration (/stcpadmin/v2)

ResourcePathPermission
Operators/operatorsstcpadmin.operator
Own profile and password/operators/me, /operators/me/passwordstcpadmin.operator
Groups and permissions/groups, /groups/id/{groupID}/operatorsstcpadmin.group
API registration/settingsstcpadmin.setting
Password policies/api/policiesstcpadmin.operator = 15
Error and event codes/error_eventsstcpadmin.error_event

The API registration corresponds to API/Supervision in the Riversoft Console Portal. It holds TLS, address and port, 2FA enablement, password policies, SSO providers and the supervision nodes (instance, node name, credential, host, port, TLS and certificate). At startup, the API loads the registration whose name matches the rest_name in its config.json.

Supervision (/stcpadminsvc/v2/supervision/stcpmon)

The API sends the commands to the supervision services of Riversoft STCP Gemini Server and Riversoft STCP DirectLink registered in the API registration. All use POST with the body {"Instance": "...", "Node": "...", "Name": "...", "Level": "..."}; without Node, the command goes to every node of the instance.

PathCommandPermission (stcpadminsvc)
/monitor/nodesLists the enabled supervision nodes.mon_console_info
/instance/infoInstance information.mon_inst_info
/instance/restartRestarts the instance.mon_inst_restart
/instance/debugChanges the debug level (Level).main_set_level
/instance/consoleConsole messages.mon_console_info
/user/infoUser information.mon_user_info
/user/startStarts an outbound connection with the user (Name).mon_user_start_conn
/user/stopCancels the user’s connection (Name).mon_user_canc_conn
/user/create_folderCreates the user’s directory structure (Name).main_user_create_folders
/schedule/startRuns the schedule (Name) right away.mon_sched_exec
/service/infoNetwork service information.mon_inst_serv
/sandbox, /keystoreLists (GET), sends (POST, Base64 content) and deletes (DELETE) mailbox or keystore files.mon_sandbox_file_management, mon_keystore_file_management

The response carries, in data, the response of each node: {"Instance": "...", "Nodename": "...", "Data": [ ... ]}.

Maintenance (/stcpadminsvc/v2/supervision/stcpauth)

All use POST with the body {"Instance": "...", "Name": "...", "NewPassword": "...", "CurrentPassword": "..."}. For operators, Instance is not used.

PathOperation
/reset/user/password, /reset/operator/passwordSets a new password, checked against the password policies.
/change/user/password, /change/operator/passwordChanges the password, sending the current one in CurrentPassword.
/reset/user/lock, /reset/operator/lockRemoves the sign-in failure lock.
/reset/user/hashRecreates the user’s authentication hash.
/reset/user/2fa, /reset/operator/2faDeletes the TOTP secret; a new one is generated at the next sign-in.