Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.
Creating a Smoke and Fire Detection (Cloud) Job
Function
This API is used to create a smoke and fire detection (cloud) job.
URI
POST /v1/{project_id}/infer/services/c-smoke-and-fire-cloud/tasks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Job name. It can contain up to 100 characters and can include uppercase and lowercase letters, digits, hyphens (-), and underscores (_). |
description |
No |
String |
Job description. It can contain up to 500 characters. |
schedule |
No |
TaskSchedule object |
Configuration of a scheduled job. Scheduled jobs do not support OBS input. URL input supports only RTMP and RTSP. |
input |
Yes |
TaskInput object |
Input configuration of a job |
output |
Yes |
TaskOutput object |
Output configuration of a job. At least one output mode must be configured. |
config |
No |
SmokeAndFireServiceConfig object |
Job configuration parameters. |
service_version |
No |
String |
Service version. |
is_saved_as_template |
No |
Boolean |
Whether to save the job configuration as a template. |
resource_order_id |
No |
String |
ID of the algorithm capability package, which can be obtained on the page for purchasing an algorithm capability package. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Type of a scheduled job. This parameter is mandatory for scheduled jobs. Options: weekly and monthly |
timezone |
Yes |
String |
Time zone where a user is located. This parameter is mandatory for scheduled jobs. The value is accurate to the minute. |
days_of_week |
No |
Array of integers |
Days in a week when a job is executed. This parameter is mandatory only for weekly jobs. The values 1 to 7 indicate Monday to Sunday respectively. Minimum: 1 Maximum: 7 |
days_of_month |
No |
Array of integers |
Days in a month when a job is executed. This parameter is mandatory only for monthly jobs. The values 1 to 31 indicate the first day to the 31st day of a month. Minimum: 1 Maximum: 31 |
periods |
No |
Array<Array<PeriodsData>> |
Time segment configuration. Select at least one time segment for executing a weekly or monthly job. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
begin_at |
Yes |
String |
Start time of a time segment, which is mandatory. The format is hh:mm:ss. |
end_at |
Yes |
String |
End time of a time segment, which is mandatory. The format is hh:mm:ss. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Input type of a job. This parameter is mandatory. Options:
|
data |
Yes |
Array of TaskInputData objects |
Input details of a job. The configuration varies according to the input type. Multiple inputs are allowed during creation, but only one input is allowed for update. |
vcn |
No |
TaskInputVcn object |
VCN server information. This parameter is mandatory only when the input type is vcn. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
video_source_id |
No |
String |
Video source ID |
stream_name |
No |
String |
Name of a VIS video stream. This parameter is mandatory when the input type is vis. |
bucket |
No |
String |
OBS bucket name. This parameter is mandatory when the input type is obs. Maximum: 63 |
path |
No |
String |
OBS path. This parameter is mandatory when the input type is obs. Maximum: 1023 |
url |
No |
String |
File URL or RESTful request URL for obtaining a video stream. This parameter is mandatory when the input type is url or edgerestful. The value contains a maximum of 1000 characters. Maximum: 1000 |
headers |
No |
Object |
Headers carried in the RESTful request for obtaining a video stream. This parameter is optional when the input type is edgerestful. The value is key-value pairs in JSON format. A maximum of 10 key-value pairs are allowed. |
certificate_check |
No |
Boolean |
Whether to verify the certificate of the HTTPS request. This parameter is mandatory when the input type is edgerestful. The value can be true or false. |
rtsp_path_in_response |
No |
String |
Video stream address in the response body for the RESTful request. This parameter is mandatory when the input type is edgerestful. The value contains a maximum of 1024 characters. Maximum: 1024 |
node_id |
No |
String |
ID of an IEF node. This parameter is mandatory only for some services when the input type is edgerestful or vcn. |
device_id |
No |
String |
VCN ID. This parameter is mandatory when the input type is vcn. |
stream_type |
No |
Integer |
Stream type used for analysis. This parameter is optional when the input type is vcn. The value ranges from 1 to 3. The value 1 indicates primary stream, the value 2 indicates secondary stream 1, and the value 3 indicates secondary stream 2. Minimum: 1 Maximum: 3 |
id |
No |
String |
ID of the edge device mounted to IEF. This parameter is mandatory when the input type is edgecamera. Maximum: 63 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ip |
Yes |
String |
IP address of the VCN server. This parameter is mandatory only when the input type is vcn. |
port |
Yes |
Integer |
Port number of the VCN server. This parameter is mandatory only when the input type is vcn. Minimum: 0 Maximum: 65535 |
username |
Yes |
String |
Account name of the VCN server. This parameter is mandatory only when the input type is vcn. |
password |
Yes |
String |
Password of the VCN server account. This parameter is mandatory only when the input type is vcn. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dis |
No |
TaskOutputDis object |
Configuration information when the output type is dis. |
webhook |
No |
TaskOutputWebhook object |
Configuration information when the output type is webhook. |
event_center |
No |
Boolean |
Whether to send alarms to the event center. This parameter is valid for cloud jobs. Default: false |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
stream_name |
Yes |
String |
DIS stream name. This parameter is mandatory when the dis type is used. Maximum: 64 |
data_category |
No |
Array of strings |
List of job output types. This parameter is optional and is required only for some services. The output contains data in the dataCategory list. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
url |
Yes |
String |
Result callback address. This parameter is mandatory when the output type is webhook. Maximum: 1000 |
headers |
Yes |
Object |
Headers carried in result callback. This parameter is mandatory when the output type is webhook. The value is key-value pairs in JSON format. A maximum of 10 key-value pairs are allowed, and a minimum of 1 key-value pair is allowed. |
data_category |
No |
Array of strings |
List of job output types. This parameter is optional and is required only for some services. The output contains data in the dataCategory list. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
common |
Yes |
SmokeAndFireCommon object |
Job runtime configuration items customized by the service publisher. The value must be in JSON format. For details about the configuration items, see the description of the corresponding algorithm service. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
video_sampling_interval |
No |
Integer |
Corresponds to the Video Sampling Interval parameter on the console. The value ranges from 1 to 10 in the unit of seconds and the default value is 1. Note: This parameter determines the detection frequency of the algorithm. If the interval increases, the maximum delay from smoke or fire occurrence to detection increases. Configure this parameter based on the acceptable response delay. Minimum: 1 Maximum: 10 Default: 1 |
fire_detection_sw |
No |
Integer |
Corresponds to the Fire Detection Switch parameter on the console. The options are as follows:
Minimum: 0 Maximum: 1 Default: 1 |
smoke_detection_sw |
No |
Integer |
Corresponds to the Smoke Detection Switch parameter on the console. The options are as follows:
Minimum: 0 Maximum: 1 Default: 1 |
render_result_sw |
No |
Integer |
Corresponds to the Render Result Switch parameter on the console. This parameter specifies whether to draw an alarm detection border in the output image. The options are as follows:
Minimum: 0 Maximum: 1 Default: 0 |
render_roi_sw |
No |
Integer |
Corresponds to the Render ROI Switch parameter on the console. This parameter specifies whether to draw a detection area in the output image. The options are as follows:
Minimum: 0 Maximum: 1 Default: 0 |
image_compression_ratio |
No |
Integer |
Corresponds to the Image Compression Ratio parameter on the console. The value ranges from 20 to 100. The default value is 90, indicating that the image compression ratio is 90%. Minimum: 20 Maximum: 100 Default: 90 |
target_roi |
No |
String |
Corresponds to the Target ROI parameter on the console.
|
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
id |
String |
Job ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Internal service error code |
error_msg |
String |
Error information Minimum: 0 Maximum: 4096 |
Example Requests
Create a smoke and fire detection (cloud) job. Use VIS as the input source, and DIS as the output channel.
POST /v1/{project_id}/infer/services/c-smoke-and-fire-cloud/tasks { "name" : "fireandsmoke-detection-task", "description" : "fireandsmoke detection task test", "input" : { "type" : "vis", "data" : [ { "stream_name" : "fireandsmoke", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-fireandsmoke-detection" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "render_result_sw" : 1, "video_sampling_interval" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[204,64],[90,321],[511,319],[617,221],[582,38],[320,11],[228,24]]}]}", "render_roi_sw" : 1, "fire_detection_sw" : 1, "smoke_detection_sw" : 1 } } }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
201 |
The service job has been created. |
400 |
Request error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot