Removing a Git Repository

The remove operation is used to remove a Git repository.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 
Request Packet Structure

A request XML packet removing a Git repository, includes the remove operation node:

<packet>
  <extension>
    <call>
      <git>
        <remove>
          ...
        </remove>
      </git>
    </call>
  </extension>
</packet>

The remove node is structured as follows:

  • The domain node is required. It specifies the domain. Data type: string.
  • The name node is required. It specifies the repository name. Data type: string.
 
Response Packet Structure

The output XML packet is structured as follows:

<packet>
  <extension>
    <call>
      <result>
        <status>...</status>
        ...
        <git>
          <remove/>
        </git>
      </result>
    </call>
  </extension>
</packet>
  • The result node is required. It wraps the response received from the server. This node contains the following nodes:
    • The status node is required. It specifies the execution status of the remove operation. Data type: result_status. Allowed values: ok | error.
    • The errcode node is optional. It is used to return the error code when the remove operation fails. Data type: unsignedInt.
    • The errtext node is optional. It is used to return the error message if the remove operation fails. Data type: string.
    • The git node is required and contains the remove node.
 
Samples

This package calls the remove operation of the git operator available for the Git Manager extansion and removes a Git repository:

<packet>
  <extension>
    <call>
      <git>
        <remove>
          <domain>example.com</domain>
          <name>repo2</name>
        </remove>
      </git>
    </call>
  </extension>
</packet>

Response:

<packet>
  <extension>
    <call>
      <result>
        <status>ok</status>
        <git>
          <remove/>
        </git>
      </result>
    </call>
  </extension>
</packet>