View All Child Workspaces in a Workspace Hierarchy

get

/primeapi/restapi/workspace/{id}/childrenHierarchy

This endpoint returns children of workspaces that meet the following requirements:
  • The object has an ID that matches the value of the {id} path parameter.

Request

Path Parameters

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : ApiEntityWorkspace
Type: object
Show Source
Nested Schema : ApiEntityWorkspaceImage
Type: object
Show Source
Nested Schema : workspaceAutonumSettings
Type: array
Unique Items Required: true
An object containing workspace autonumber settings.
Show Source
Nested Schema : workspaceSettings
Type: array
Unique Items Required: true
An object containing workspace settings.
Show Source
Nested Schema : image
Type: array
An image object represented in binary format.
Show Source
Nested Schema : ApiEntityWorkspaceAutonumSetting
Type: object
Show Source
Nested Schema : ApiEntityWorkspaceSetting
Type: object
Show Source

204 Response

Successful operation with no content.

404 Response

The requested workspace does not exist or you do not have access to it.

Examples

The following examples show how to use the API to view the child hierarchy of a workspace including the parent workspace.

Using cURL

Use cURL command line options to form and submit a request to the Prime server.

cURL Command

curl -X GET -H "Accept:application/json" -u "Molly Abraham:password123" https://localhost:7001/primeapi/restapi/workspace/1/childrenHierarchy

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: 'GET', 
          path: "/primeapi/restapi/workspace/1/childrenHierarchy", 
          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

[{ 
      		"securityGuid": "4F3A7B4202864C87E05394B8580AF2DE", 
      		"workspaceSettings": [{ 
      				"workspaceId": 407, 
      				"workspaceSettingId": 1769, 
      				"settingName": "ProjectActualPercentLinkFlag", 
      				"settingValue": "N", 
      				"updateDate": "2017-05-10T23:13:03" 
      			}, { 
      				"workspaceId": 407, 
      				"workspaceSettingId": 1720, 
      				"settingName": "ScheduleCheck.LongLags", 
      				"settingValue": "Y", 
      				"updateDate": "2017-05-10T23:13:03" 
      			},  
      			//...more workspaceSettings objects 
      		], 
      		"parentWorkspace": 1, 
      		"workspaceCode": "archanaWS", 
      		"workspaceAutonumSettings": [{ 
      				"suffixIncrement": 1, 
      				"suffix": "0", 
      				"workspaceId": 407, 
      				"autonumId": 513, 
      				"prefix": "AA", 
      				"updateDate": "2017-05-10T23:13:03" 
      			}, { 
      				"suffixIncrement": 1, 
      				"suffix": "10",
				"workspaceId": 407, 
      				"autonumId": 511, 
      				"prefix": "WP", 
      				"updateDate": "2017-05-10T23:13:03" 
      			},  
      			//...more workspaceAutonumSettings objects 
      		], 
      		"workspaceId": 407, 
      		"sequenceNumber": 100, 
      		"workspaceName": "archanaWS", 
      		"updateDate": "2017-05-10T23:13:03" 
      	},  
      	{ 
      		"securityGuid": "4F3AB071AE3D571BE05394B8580A3958", 
      		"workspaceSettings": [{ 
      				"workspaceId": 408, 
      				"workspaceSettingId": 1829, 
      				"settingName": "use_lag_early_start", 
      				"settingValue": "true", 
      				"updateDate": "2017-05-10T23:27:55" 
      			}, { 
      				"workspaceId": 408, 
      				"workspaceSettingId": 4600, 
      				"settingName": "PeriodTo", 
      				"settingValue": "30", 
      				"updateDate": "2017-05-12T01:52:16" 
      			},  
      			//...more workspaceSettings objects 
      		], 
      		"parentWorkspace": 407, 
      		"workspaceCode": "road", 
      		"workspaceAutonumSettings": [{ 
      				"suffixIncrement": 1, 
      				"suffix": "001", 
      				"workspaceDate": "2017-05-10T23:27:55" 
      			}, { 
      				"suffixIncrement": 1, 
      				"suffix": "001", 
      				"workspaceId": 408, 
      				"autonumId": 532, 
      				"prefix": "CO", 
      				"updateDate": "2017-05-10T23:27:55" 
      			},  
      			//...more workspaceSettings objects 
      		], 
      		"workspaceId": 408, 
      		"sequenceNumber": 10, 
      		"workspaceName": "road", 
      		"updateDate": "2017-05-10T23:27:55" 
      	} 
      	//... more workspace objects 
      ]