Help Center> VAS> API Reference> Common Parameters> Input and Output Parameters

Input and Output Parameters

task.input

  • Parameters in task.input

    Parameter

    Mandatory

    Type

    Description

    type

    Yes

    String

    Type of input video data. The options are as follows:

    • obs: Read video data from OBS on HUAWEI CLOUD.
    • url: Read video data from a specified URL.
    • edgecamera: Read video data from a specified edge camera.
    • vis: Read video data from VIS.
    • edgerestful: Read video data from the customized streaming media server.
    • vcn: Read data from VCN on HUAWEI CLOUD.

    data

    Yes

    Array of data objects

    Content of input video data

    vcn

    No

    Object

    Information about vcn. This parameter is mandatory only when type is set to vcn. For details, see Data structure of the vcn field.

  • Data structure of the data field when type is set to obs

    Parameter

    Mandatory

    Type

    Description

    bucket

    Yes

    String

    OBS bucket name

    path

    Yes

    String

    Path within the OBS bucket, for example, output/c1.mp4

  • Data structure of the data field when type is set to url

    Parameter

    Mandatory

    Type

    Description

    url

    Yes

    String

    URL of the video data. Currently, only the URL of OBS is supported. You need to grant the anonymous users the permission to read the URL.

  • Data structure of the data field when type is set to edgecamera

    Parameter

    Mandatory

    Type

    Description

    url

    Yes

    String

    URL of the video data. Currently, only the URL of OBS is supported. You need to grant the anonymous users the permission to read the URL.

  • Data structure of the data field when type is set to vis

    Parameter

    Mandatory

    Type

    Description

    stream_name

    Yes

    String

    Name of a video stream in VIS

  • Data structure of the data field when type is set to edgerestful

    Parameter

    Mandatory

    Type

    Description

    node_id

    Yes

    String

    ID of the edge node where the job is running. This parameter is left blank when a multi-task job is delivered to the edge node.

    url

    Yes

    String

    REST request for the container to obtain the Edge RESTful stream

    Format: http(s):ip:port/xxx

    certificate_check

    Yes

    Boolean

    true: The algorithm needs to verify the certificate of the HTTPS request.

    false: The algorithm does not need to verify the certificate of the HTTPS request.

    Default value: false

    The VAS platform only performs input verification, which does not involve service logic.

    rtsp_path_in_response

    Yes

    String

    Path of the edgerestful stream address in the response body. The path cannot begin with a slash (/). For example: data/url.

  • Data structure of the data field when type is set to vcn

    Parameter

    Mandatory

    Type

    Description

    node_id

    No

    String

    ID of the edge node where the job is running. This parameter is left blank when a multi-task job is delivered to the edge node.

    device_id

    Yes

    String

    Device ID, which complies with the regular expression ^([0-9]{20}[#]{1}[a-zA-Z0-9]{32})|([0-9]{20}[#]{1}[0-9]{1, 10}[#]{1}[a-zA-Z0-9]{32})$.

  • Data structure of the vcn field when type is set to vcn

    Parameter

    Mandatory

    Type

    Description

    ip

    Yes

    String

    IP address of the vcn server

    port

    Yes

    String

    Port number of the vcn server

    username

    Yes

    String

    Account name of the vcn server

    password

    Yes

    String

    Password of the account for logging in to the vcn server

task.output

  • Parameters in task.output

    Parameter

    Mandatory

    Type

    Description

    obs

    Yes

    Object

    Output path of OBS. For details, see Data structure of the obs field.

    hosting

    No

    Object

    When type is set to hosting, the job results are hosted by OBS on the service side. For details, see Data structure of the hosting field.

    NOTE:
    • You can query a single job API to obtain the content in the results file (results.json) as well as the file bucket and path.
    • You can call the OBS SDK to download the results file through the file bucket and path. The file is saved for 48 hours by default.

    dis

    No

    Object

    DIS channel configuration. For details, see Data structure of the dis field.

    webhook

    No

    Object

    Webhook address configuration. For details, see Data structure of the webhook field.

    This output type is supported only by edge jobs.

    localpath

    No

    Object

    localpath output type. For details, see Data structure of the localpath field.

    This output type is supported only by edge jobs. Used to save task results on the edge node.

  • Data structure of the obs field

    Parameter

    Mandatory

    Type

    Description

    bucket

    Yes

    String

    Name of the OBS bucket where result files are stored

    path

    Yes

    String

    Path to the result file in the OBS bucket, for example, output/

  • Data structure of the hosting field

    Parameter

    Mandatory

    Type

    Description

    obs

    No

    Object

    OBS information of the results file, results.json. For details, see Data structure of the hosting.obs field.

    Available when results.json is generated and does not expire.

    result_json_overdue_at

    No

    String

    The expiration date of the hosted file, results.json. By default, the file is saved for 48 hours.

    Available when results.json is generated and does not expire.

    check_obs_after_end_state

    No

    Boolean

    If true is selected, OBS is verified.

  • Data structure of the hosting.obs field

    Parameter

    Mandatory

    Type

    Description

    bucket

    Yes

    String

    Name of the OBS bucket hosting the results.json file

    path

    Yes

    String

    Path to results.json in the OBS bucket, for example, output/

  • Data structure of the dis field

    Parameter

    Mandatory

    Type

    Description

    stream_name

    Yes

    String

    Name of the DIS channel

    data_category

    No

    String

    List of output job data types. The default value is []. The output contains data in the dataCategory list.

    The value range is [FaceImage, OriginImage].

    • FaceImage: Indicates that a face image is sent.
    • OriginImage: Indicates that the original image is sent.
    NOTE:

    This parameter is only supported for face detection.

  • Data structure of the webhook field

    Parameter

    Mandatory

    Type

    Description

    url

    Yes

    String

    URL, for example, https://apigw.huawei.com/api/mqs/message/sit.

    headers

    Yes

    Object

    headers parameter setting. Specify your own key and value.

    data_category

    No

    String

    List of output job data types. The default value is []. The output contains data in the dataCategory list.

    The value range is [FaceImage, OriginImage].

    • FaceImage: Indicates that a face image is sent.
    • OriginImage: Indicates that the original image is sent.
    NOTE:

    This parameter is only supported for face detection.

  • Data structure of the localpath field

    Parameter

    Mandatory

    Type

    Description

    mount_source_path

    Yes

    String

    Mount source path for storing the task results. Must be a linux path with a maximum length of 255 characters, for example, /home.

    data_category

    No

    String

    List of output job data types. The default value is []. The output contains data in the data_category list.

    The value range is [FaceImage, OriginImage].

    • FaceImage: Indicates that a face image is sent.
    • OriginImage: Indicates that the original image is sent.
    NOTE:

    This parameter is only supported for face detection.