...
This web service deletes a specified resource (PwsResourceRef). The service will return the identity of the resource that was deletedresource (PwsResourceRef).
Request Format
Panel | ||
---|---|---|
| ||
|
Request Elements
Element | Data Type | Required? | Default | Description | Sample Data |
---|---|---|---|---|---|
Int32 |
No | Click here for more information | 1 | |
String |
Yes | Click here for more information | AWeOOZxrFCHSwxj9X5YBug== | |
PurgeFutureResourceHistoryFlag | Boolean | No |
false | This applies only if the resource cannot be deleted and TerminationDateIfInUse is specified. In that case, it will attempt to terminate the resource as of the specified date instead. If this flag is not set, and there are future resource history records for this resource, the request will fail. If this flag is set, the future resource history records will be deleted and the resource will be terminated as of the specified date. | true |
ResourceIdentity |
Yes | The unique key fields associated with identifying a resource. | ||
ResourceTimestamp | String |
No | This is a Base64 encoded timestamp optionally utilized for resource locking. | ||
TerminationDateIfInUse | DateTime |
No | If a date is specified for TerminationDateIfInUse, and the resource cannot be deleted because it is referenced elsewhere in the system, the resource will be terminated as of the specified date instead. Otherwise, the request will fail. |
Request Usage Example(s)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/"> <soapenv:Header/> <soapenv:Body> <pws:PwsDeleteResource> <pws:serviceRequest> <req:RequestId>1</req:RequestId> <req:SessionTicket>AWeOOZxrFCHSwxj9X5YBug==</req:SessionTicket> <req:PurgeFutureResourceHistoryFlag>true</req:PurgeFutureResourceHistoryFlag> <req:ResourceIdentity> <com:ResourceReferenceSystemId>temporary_resource</com:ResourceReferenceSystemId> </req:ResourceIdentity> </pws:serviceRequest> </pws:PwsDeleteResource> <!--req:ResourceTimestamp>?</req:ResourceTimestamp--> /soapenv:Body> </soapenv:Envelope> |
Response Format
Panel | ||
---|---|---|
| ||
|
Response Elements
Element | Data Type | Description | Sample Data |
---|---|---|---|
Messages | The web service response status and message. Click here for more information | ||
Int32 | Click here for more information | 1 | |
Status | Click here for more information | Ok | |
DateTime | Click here for more information | 2018-10-17T16:39:41.3893819Z | |
ResourceIdentity | The unique key fields associated with identifying a resource. | ||
Timestamp | String | This is a Base64 encoded timestamp optionally utilized for resource locking. This will be populated only resource was not deleted (i.e. it was terminated or could not be deleted). |
Response Usage Example(s)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <PwsDeleteResourceResponse xmlns="http://projectorpsa.com/PwsProjectorServices/"> <!--req:TerminationDateIfInUse>?</req:TerminationDateIfInUse--><PwsDeleteResourceResult xmlns:a="http://projectorpsa.com/DataContracts/Responses/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/> <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId> <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status> <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-10-17T16:39:41.3893819Z</ServerTimestampUtc> <a:ResourceIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"> <b:ResourceDisplayName>Temporary Resource</b:ResourceDisplayName> <b:ResourceId i:nil="true"/> <b:ResourceReferenceSystemId>temporary_resource</b:ResourceReferenceSystemId> <b:ResourceUid>1152921504607131540</b:ResourceUid> </pws:serviceRequest>a:ResourceIdentity> <a:Timestamp i:nil="true"/> </PwsDeleteResourceResult> </pws:PwsDeleteResource>PwsDeleteResourceResponse> </soapenvs:Body> </soapenvs:Envelope> |
Response Format
Response Elements
...
PwsDeleteResource - Common Errors and Warnings
- For all errors and warnings please refer to the Complete List of Errors and Warnings
ErrorNumber | ErrorCode | ErrorText |
---|
50024 |
EntityNotFound | Entity PwsResourceRef was not found. | |
50070 | AccessPermissionDenied | Permission denied. |
57713 | CannotDeleteReferencedResource | Resource cannot be deleted because it is referenced by [Client/Project/Engagement/Role/Resource] Resource-Type UDF. |