FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.2   R E S T   R E P O S I T O R Y   U T I L I T Y

Rename Project Endpoint

Renames an existing project.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/RenameProject/execute

Parameters

Parameter

Description

WorkspaceName (required)

Workspace name. Type string.

ProjectName (required)

Project name. Type string.

NewProjectName (required)

New project name. Type string.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Variable of type boolean

Remarks

If the source project is absent or the target project already exists, this endpoint returns an error. The endpoint also returns an error in attempt to rename a project with the same name.

Example Usage

The example below renames a project in the Default Workspace of Business Analyst Server Repository. In order to demonstrate this method, a new project is created and then renamed.

 

STEP 1: Create a project to be renamed

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/CreateProject/execute?
WorkspaceName=Default Workspace&
ProjectName=project_RenameProject&
f=PJSON

 

STEP 2: Execute the RenameProject request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/RenameProject/execute?
WorkspaceName=Default Workspace&
ProjectName=project_RenameProject&
NewProjectName=project_renamed_RenameProject&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"OutputStatus",
      "dataType":"GPBoolean",
      "value":"true"
    }
  ],
  "messages":
  [
  ]
}

 

In attempt to rename a project to already existing destination project, an error message is returned:

 

Error Response

{
  "error":
  {
    "code": "-2147467259",
    "message": "Failed to rename project.",
    "details":
    [
      "Error code: 0x80004005\n..."
    ]
  }
  "messages":
  [
  ]
}

 

NOTE: The response has been abbreviated where "..." is noted.

 

See Also

Business Analyst Server REST Reference