次の方法で共有


Jobs - DeleteJobs Add

Initiates a job which deletes all models, twins, and relationships on the instance. Does not delete any other types of entities. Status codes:

  • 202 Created
  • 400 Bad Request
    • JobLimitReached - The maximum number of delete jobs allowed has been reached.
    • ValidationFailed - Operation-Id already exists.
POST https://digitaltwins-hostname/jobs/deletions?api-version=2023-10-31
POST https://digitaltwins-hostname/jobs/deletions?api-version=2023-10-31&timeoutInMinutes={timeoutInMinutes}

URI Parameters

Name In Required Type Description
api-version
query True

string

The requested API version.

timeoutInMinutes
query

integer

int32

Desired timeout for the delete job. Once the specified timeout is reached, service will stop any delete operations triggered by the current delete job that are in progress, and go to a failed state. Please note that this will leave your instance in an unknown state as there won't be any rollback operation.

Request Header

Name Required Type Description
operation-id

string

ID for the operation's status monitor. The ID is generated if header was not passed by the client.

traceparent

string

Identifies the request in a distributed tracing system.

tracestate

string

Provides vendor-specific trace identification information and is a companion to traceparent.

Responses

Name Type Description
202 Accepted

DeleteJob

Job Accepted

Headers

Operation-Location: string

Other Status Codes

ErrorResponse

Default response.

Headers

x-ms-error-code: string

Security

oauth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize?resource=0b07f429-9f4b-4714-9392-cc5e8e80c8b0

Examples

Add a job

Sample request

POST https://digitaltwins-hostname/jobs/deletions?api-version=2023-10-31&timeoutInMinutes=60

Sample response

Operation-Location: https://instance-name/jobs/deletions/{id}?api-version=2023-10-31
Operation-Id: {id}
{
  "id": "deletejob1",
  "createdDateTime": "2022-01-01T00:00:00.0000000+00:00",
  "finishedDateTime": "2022-01-01T00:01:00.0000000+00:00",
  "purgeDateTime": "2022-01-31T00:01:00.0000000+00:00",
  "status": "notstarted"
}

Definitions

Name Description
delete-job-status

Status of the job.

DeleteJob

A job which contains a reference to the operations to perform, results, and execution metadata.

Error

Error definition.

ErrorResponse

Error response.

InnerError

A more specific error description than was provided by the containing error.

delete-job-status

Status of the job.

Name Type Description
failed

string

notstarted

string

running

string

succeeded

string

DeleteJob

A job which contains a reference to the operations to perform, results, and execution metadata.

Name Type Description
createdDateTime

string

Start time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.

error

Error

Details of the error(s) that occurred executing the import job.

finishedDateTime

string

End time of the job. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.

id

string

The identifier of the delete job.

purgeDateTime

string

Time at which job will be purged by the service from the system. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.

status

delete-job-status

Status of the job.

Error

Error definition.

Name Type Description
code

string

Service specific error code which serves as the substatus for the HTTP error code.

details

Error[]

Internal error details.

innererror

InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

ErrorResponse

Error response.

Name Type Description
error

Error

The error details.

InnerError

A more specific error description than was provided by the containing error.

Name Type Description
code

string

A more specific error code than was provided by the containing error.

innererror

InnerError

An object containing more specific information than the current object about the error.