This API (DescribeAuditingTextJob
) is used to query the specified text moderation job.
Note:Text moderation results are retained for three months, so you can query moderation results in the past three months through this API.
GET /text/auditing/<jobId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Note:Authorization: Auth String (for more information, see Request Signature).
This API only uses common request headers. For more information, see Common Request Headers.
This request does not have a request body.
This API only returns common response headers. For more information, see Common Response Headers.
The response body returns application/xml data. The following contains all the nodes:
<Response>
<JobsDetail>
<Code>Success</Code>
<Message>Success</Message>
<DataId></DataId>
<JobId></JobId>
<State></State>
<CreationTime></CreationTime>
<Object></Object>
<SectionCount></SectionCount>
<Result>1</Result>
<PornInfo>
<HitFlag></HitFlag>
<Count></Count>
</PornInfo>
<AdsInfo>
<HitFlag></HitFlag>
<Count></Count>
</AdsInfo>
<IllegalInfo>
<HitFlag></HitFlag>
<Count></Count>
</IllegalInfo>
<AbuseInfo>
<HitFlag></HitFlag>
<Count></Count>
</AbuseInfo>
</Section>
<StartByte></StartByte>
<PornInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</PornInfo>
<AdsInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</AdsInfo>
<IllegalInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</IllegalInfo>
<AbuseInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</AbuseInfo>
</Section>
</Section>
<StartByte></StartByte>
<PornInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</PornInfo>
<AdsInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</AdsInfo>
<IllegalInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</IllegalInfo>
<AbuseInfo>
<HitFlag></HitFlag>
<Score></Score>
<Keywords></Keywords>
</AbuseInfo>
</Section>
</JobsDetail>
<RequestId></RequestId>
</Response>
The nodes are as described below:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
Response | None | Response container | Container |
Response
has the following sub-nodes:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
JobsDetail | Response | Job details | Container |
RequestId | Response | The ID automatically generated by the server for a request when the request is sent, which can help locate problems faster. | String |
JobsDetail
has the following sub-nodes:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
Code | Response.JobsDetail | Error code, which will be returned only if State is Failed . For more information, see Error Codes. |
String |
Message | Response.JobsDetail | Error description, which will be returned only if State is Failed . |
String |
DataId | Response.JobsDetail | This field will return the original content in the moderation result, which can contain up to 512 bytes. You can use this field to uniquely identify the data to be moderated in your business. | String |
JobId | Response.JobsDetail | Moderation job ID. | String |
State | Response.JobsDetail | Job status. Valid values: Submitted , Success , Failed , Auditing . |
String |
CreationTime | Response.JobsDetail | Job creation time. | String |
Object | Response.JobsDetail | Name of the moderated object, which will be returned if Object is selected during job creation. |
String |
Content | Response.JobsDetail | Base64-encoded text content, which will be returned if Content is selected during job creation. |
String |
SectionCount | Response.JobsDetail | The text moderation feature divides the text into segments for moderation, each of which contains 10,000 UTF-8 characters. This parameter indicates the number of segments. | Integer |
Label | Response.JobsDetail | This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions according to your business needs. Returned values: Normal , Porn , Ads , and other types of unsafe or inappropriate content). |
String |
Result | Response.JobsDetail | This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results according to your business needs. Valid values: 0 (normal), 1 (sensitive), 2 (suspiciously sensitive, with human review recommended). |
Integer |
PornInfo | Response.JobsDetail | The moderation result of the pornographic information moderation scene. | Container |
AdsInfo | Response.JobsDetail | The moderation result of the advertising information moderation scene. | Container |
IllegalInfo | Response.JobsDetail | The moderation result of the illegal information moderation scene. | Container |
AbuseInfo | Response.JobsDetail | The moderation result of the abusive information moderation scene. | Container |
Section | Response.JobsDetail | Result information of the specific text segment. | Container Array |
UserInfo | Response.JobsDetail | Business field. | Container |
PornInfo
and AdsInfo
have the following sub-nodes:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
HitFlag | Response.JobsDetail.*Info | The moderation result returned for the moderation scene. Returned values:
|
Integer |
Count | Response.JobsDetail.*Info | The number of segments that hit this moderation scene. | Integer |
Section
has the following sub-nodes:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
StartByte | Response.JobsDetail.Section | The starting position of the segment in the text (for example, 10 represents the 11th UTF-8 character). This value starts from 0. | Integer |
Label | Response.JobsDetail.Section | This field is used to return the maliciousness tag with the highest priority in the detection result, which represents the moderation result suggested by the model. We recommend you handle different types of violations and suggestions according to your business needs. Returned values: Normal , Porn , Ads , and other types of unsafe or inappropriate content. |
String |
Result | Response.JobsDetail.Section | This field indicates the moderation result. You can perform subsequent operations based on the result. We recommend you handle different results according to your business needs. Valid values: 0 (normal), 1 (sensitive), and 2 (suspiciously sensitive, with human review recommended). |
Integer |
PornInfo | Response.JobsDetail.Section | The moderation result of the pornographic information moderation scene. | Container |
AdsInfo | Response.JobsDetail.Section | The moderation result of the advertising information moderation scene. | Container |
IllegalInfo | Response.JobsDetail.Section | The moderation result of the illegal information moderation scene. | Container |
AbuseInfo | Response.JobsDetail.Section | The moderation result of the abusive information moderation scene. | Container |
PornInfo
, AdsInfo
, IllegalInfo
, and AbuseInfo
have the following sub-nodes:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
HitFlag | Response.JobsDetail.Section.*Info | The moderation result returned for the moderation scene. Returned values:
|
Integer |
Score | Response.JobsDetail.Section.*Info | Moderation result score of the segment. The higher the score, the more sensitive the segment is. | Integer |
Keywords | Response.JobsDetail.Section.*Info | Keywords hit in the current moderation scene. Multiple keywords are separated by commas. | String |
UserInfo
has the following sub-nodes:
Node Name (Keyword) | Parent Node | Description | Type |
---|---|---|---|
TokenId | Response.JobsDetail.UserInfo | Business TokenId , which can contain up to 128 bytes. |
String |
Nickname | Response.JobsDetail.UserInfo | Business Nickname , which can contain up to 128 bytes. |
String |
DeviceId | Response.JobsDetail.UserInfo | Business DeviceId , which can contain up to 128 bytes. |
String |
AppId | Response.JobsDetail.UserInfo | Business AppId , which can contain up to 128 bytes. |
String |
Room | Response.JobsDetail.UserInfo | Business Room , which can contain up to 128 bytes. |
String |
IP | Response.JobsDetail.UserInfo | Business IP , which can contain up to 128 bytes. |
String |
Type | Response.JobsDetail.UserInfo | Business Type , which can contain up to 128 bytes. |
String |
This API returns common error responses and error codes. For more information, see Error Codes.
GET /text/auditing/stb1ca9fc8a3ed11ea834c525400863904 HTTP/1.1
Accept: */*
Authorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=28e9a4986df11bed0255e97ff90500557e0e****
Host: examplebucket-1250000000.ci.ap-beijing.myqcloud.com
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 666
Connection: keep-alive
Date: Thu, 15 Jun 2017 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****
<Response>
<JobsDetail>
<JobId>st78925397b9de11eba532525400946f76</JobId>
<State>Success</State>
<CreationTime>2021-05-21T10:44:32+08:00</CreationTime>
<Object>test.txt</Object>
<SectionCount>1</SectionCount>
<Label>Illegal</Label>
<Result>1</Result>
<PornInfo>
<HitFlag>0</HitFlag>
<Count>0</Count>
</PornInfo>
<AdsInfo>
<HitFlag>0</HitFlag>
<Count>0</Count>
</AdsInfo>
<IllegalInfo>
<HitFlag>0</HitFlag>
<Count>0</Count>
</IllegalInfo>
<AbuseInfo>
<HitFlag>0</HitFlag>
<Count>0</Count>
</AbuseInfo>
<Section>
<StartByte>0</StartByte>
<Label>Illegal</Label>
<Result>1</Result>
<PornInfo>
<HitFlag>0</HitFlag>
<Score>0</Score>
<Keywords></Keywords>
</PornInfo>
<AdsInfo>
<HitFlag>0</HitFlag>
<Score>0</Score>
<Keywords></Keywords>
</AdsInfo>
<IllegalInfo>
<HitFlag>0</HitFlag>
<Score>0</Score>
<Keywords></Keywords>
</IllegalInfo>
<AbuseInfo>
<HitFlag>0</HitFlag>
<Score>0</Score>
<Keywords></Keywords>
</AbuseInfo>
</Section>
</JobsDetail>
<RequestId>xxxxxxxxxxxxxx</RequestId>
</Response>
Was this page helpful?