Login | Join Now
  • CUBiT API: PblUpload

    Product:
    CUBiT

    Component:
    CUBiT Web Services

    Summary:

    Project Build Library (PBL) file and directory upload interface.



     

    1.1. Description

    Project Build Library (PBL) file and directory upload interface. This function is used to create files and directories in the Project Build Library. Unless you are building your own PBL client, this function will not be very useful to you.

    1.2. URL

    /cubit_api/1/pbl_upload

    1.3. Authentication

    This method requires authentication using an API key.

    1.4. Parameters

    	comment ( zero or once )
    		An optional comment to leave about the operation being performed. This will not appear in the 
    		PBL, but it will be in the audit log entry for this event. 
    		Type: String
    	desc ( zero or once )
    		The text description of the file. 
    		Type: String
    	file ( Required, once )
    		URL-encoded name and contents of the file, encoded as per RFC 1867. 
    		Type: String
    	force ( zero or once )
    		If the force option is present, the file will be uploaded even if a file with that name currently 
    		exists. A file cannot be uploaded over a directory of the same name, even if the force parameter 
    		is present. The only valid value for this parameter is True. 
    		Type: String
    	md5sum ( Required, once )
    		The md5 checksum of the file being uploaded. 
    		Type: String
    	path ( Required, once )
    		The path to the file being operated on. For example, if the complete file URL is 
    		/pbl/zork/pub/foo/bar/test.txt, the path would be /foo/bar. Note: the path parameter is used 
    		slightly differently in this method than in other methods, since the filename is not appended 
    		to the end of the parameter. 
    		Type: String
    	proj ( Required, once )
    		The name of the project which contains the file we are operating on. 
    		Type: String
    	sig ( Required, once )
    		API authentication hash signature. 
    		Type: String
    	type ( Required, once )
    		The type of file that we are operating on. Valid values are 'pub' and 'priv'. 
    		Type: String
    	userid ( Required, once )
    		The login name of the user initiating the request. 
    		Type: String
    

    1.5. Example Response

    	<?xml version='1.0'?>
    	<cubit version='1'>
    		<status>OK</status>
    	</cubit>
    

    1.6. Response Codes

    • 200 - ok
    • 400 - Login failed / Insufficient permissions