RtspCameraRegister a new RTSP camera at a caller-chosen id

Register a new RTSP camera at a caller-chosen id

Creates a new RtspCameraAggregate at the id in the URL. The id MUST be a UUID: it becomes the camera's object-storage prefix for life, so a name-shaped id is refused. Ownership is checked against the credentials — only an admin or a super API key may register on behalf of another owner/org; for anyone else ownerId/orgId must be their own or absent (403 otherwise). New clients should prefer POST /rtsp-cameras, which assigns the id and returns it. With video control enabled, encrypted source staging happens first and the response reports placementStatus=pending.

curl -X POST "https://api.spkey.co/rtsp-cameras/example_string/RegisterRtspCamera" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "cameraId": "example_string",
  "name": "John Doe",
  "rtspUrl": "example_string",
  "username": "John Doe",
  "password": "example_string",
  "httpSnapshotUrl": "example_string",
  "ownerId": "example_string",
  "orgId": "example_string"
}'
{
  "success": true,
  "aggregateId": "example_string",
  "version": 3.14,
  "placementStatus": "pending",
  "event": "null"
}
POST
/rtsp-cameras/{id}/RegisterRtspCamera
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (JWT)
Bearer Tokenstring
Required

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.
API Key (header: X-API-Key)
X-API-Keystring
Required

API key for B2B organization access. Provided during organization onboarding.

API key for B2B organization access. Provided during organization onboarding.
path
idstring
Required

RTSP camera UUID (aggregate id)

Content-Typestring
Required

The media type of the request body

Options: application/json
cameraIdstring

Camera UUID. OPTIONAL and redundant: the id in the URL is the camera, and this is filled in from it when omitted — a DIFFERENT value here is a 400 rather than a guess, because the two used to address different things (aggregate here, storage folder there). It must be a UUID: it becomes the camera's object-storage prefix for life. New clients should let the server assign it — POST /rtsp-cameras returns the id it minted — while an integration that keeps its own uuid4 as a correlation key may go on naming it.

namestring
Required

Human-readable camera name

Min length: 1
rtspUrlstring
Required

RTSP source URL (e.g. rtsp://1.2.3.4:554/stream)

Min length: 1
usernamestring

RTSP authentication username

passwordstring

RTSP authentication password

httpSnapshotUrlstring

Optional HTTP JPEG/PNG snapshot endpoint

ownerIdstring

B2C user ID who owns this camera. Must be the authenticated caller unless the caller is an admin or holds a super API key; omit it and the caller owns the camera.

orgIdstring

B2B organisation that owns this camera. Same rule as ownerId: your own org, unless you are an admin or a super API key.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (JWT). JWT token from SmartphoneKey authentication. Identifies the B2C user or B2B service.

header
X-API-Keystring
Required

API Key for authentication. API key for B2B organization access. Provided during organization onboarding.

Path Parameters

idstring
Required

RTSP camera UUID (aggregate id)

Body

application/json
cameraIdstring

Camera UUID. OPTIONAL and redundant: the id in the URL is the camera, and this is filled in from it when omitted — a DIFFERENT value here is a 400 rather than a guess, because the two used to address different things (aggregate here, storage folder there). It must be a UUID: it becomes the camera's object-storage prefix for life. New clients should let the server assign it — POST /rtsp-cameras returns the id it minted — while an integration that keeps its own uuid4 as a correlation key may go on naming it.

namestring
Required

Human-readable camera name

rtspUrlstring
Required

RTSP source URL (e.g. rtsp://1.2.3.4:554/stream)

usernamestring

RTSP authentication username

passwordstring

RTSP authentication password

httpSnapshotUrlstring

Optional HTTP JPEG/PNG snapshot endpoint

ownerIdstring

B2C user ID who owns this camera. Must be the authenticated caller unless the caller is an admin or holds a super API key; omit it and the caller owns the camera.

orgIdstring

B2B organisation that owns this camera. Same rule as ownerId: your own org, unless you are an admin or a super API key.

Responses

successboolean
Required
aggregateIdstring
Required
versionnumber
Required
placementStatusstring
Required
Allowed values:pendingrunning
eventobject,null
Required