Delete a Workspace
delete
/primeapi/restapi/workspace/{id}
Send a request to this endpoint to delete a workspace.
Request
Path Parameters
-
id: integer(int64)
The system-generated identifier of a workspace.
Response
Supported Media Types
- application/json
204 Response
Successful operation with no content.
404 Response
Invalid input.
Examples
The following examples show how to use the API to delete a workspace.
Using cURL
Use cURL command line options to form and submit a request to the Prime server.
cURL Command
curl -X DELETE -H "Accept:application/json" -u "Molly Abraham:password123" https://localhost:7001/primeapi/restapi/v17.2/workspace/31907
Using Node JS
Use the Node JS https class interface to form and send an HTTP request to the Oracle Prime API server. Write a Node JS script that forms and sends an HTTP request, then execute the script with node
to interact with the server.
Node JS Script
var https = require('https'); var options = { hostname: "localhost", port: 7001, method: 'DELETE', path: "/primeapi/restapi/v17.2/workspace/31907", auth: "Molly Abraham :password123" } var request = https.request(options, function(result){ result.setEncoding('utf8'); result.on('data', function(response){ console.log(response); }); }); request.end();
Example Response
When the command executes, the Oracle Prime server returns an HTTP response of content-type application/json:
Example of Response Header
HTTP/1.1 200 OK Date: Thu, 22 Dec 2016 19:04:45 GMT Transfer-Encoding: chunked Content-Type: application/json
Example of Response Body
This endpoint returns no data.