Skip to content

Stop cloud runtime

Request

Stop the cloud runtime a profile is running in.

  • Preconditions: there must be an active run started by you for that profile. Calling it while the runtime is already stopped or releasing succeeds without doing anything.
  • Effect: stops billing, settles usage, releases the profile lock, and asks the client to archive the profile and cookies back to the cloud before the runtime is released.
  • Completion: accepted, not complete. Poll /cloudbrowser/page until cloudBrowserStatus is CLOSED and cloudBrowserArchiveStatus reaches COMPLETED or FAILED.
  • When archiving fails: the run stays billable and still shows as RUNNING. force is honoured only in that state: it skips archiving and releases the runtime, which discards this session's profile changes.
  • Concurrency: concurrent stops for one run are serialized, so a duplicate call is safe.

Documented business errors: 40002, 40006, 40008, 40020. See Error Codes for what each code means. Any operation can additionally return the common codes.

Security
OpenApiBearer
Bodyapplication/jsonrequired
envIdstring(EnvironmentId)^[1-9]\d*$required

Browser profile (environment) ID. Serialized as a decimal string to avoid JavaScript precision loss on 64-bit integers.

Example:"1800000000000001"
forceboolean

Whether to forcibly release the cloud runtime. Only takes effect when the current run has an archive status of FAILED; in that case the archive step is skipped and runtime resources are reclaimed. Ignored in all other cases.

Default:false
Example:false
curl -i -X POST \
  https://api.morelogin.com/cloudbrowser/stop \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "envId": "1800000000000001",
    "force": false
  }'

Responses

Success

Bodyapplication/json
codeintegerrequired

Return result code. 0 means success; other codes indicate exceptions.

Example:0
msgstring or nullrequired

Error message. Usually null on success.

Example:null
requestIdstring

Operation request ID. This field may be present when the request passes through the API gateway.

Example:"1d4f3ea968664593860b94b35d4ebf5e"
datanull
Example:null
Response
{ "code": 0, "msg": null, "requestId": "1d4f3ea968664593860b94b35d4ebf5e", "data": null }