Ultradrop Files are text files that can be used to insert data into an Ultradrop Point. These files are identified by their file name and can be shared across projects by configuring an ultradrop point to load data from the same ultradrop file.

Ultradrop files when fetched via the API return a data record with the follow keys:

  • filename - The unique filename for the ultradrop file.
  • length - File size in bytes.
  • md5 - md5 encoded hash of the file.

Example JSON object:

{
  "filename": "%PPC_PATH%\ultradrop\hotels_by_zone.txt",
  "length": 6273,
  "md5": "1b2619e7b73e33c4d088eeae3bd06c70"
}

GET /api/v1/ultradrop_files
Returns a list of ultradrop files that have been uploaded to the user's account.

Returns a list of uploaded ultradrop files in the user’s account.

{
    "status": "success",
    "message": "success",
    "result": [
      {
        "filename": "%PPC_PATH%\ultradrop\hotels_by_zone2.txt",
        "length": 6053,
        "md5": "55434271bcd0c7414dead7ba9ecbd914"
      },
      {
        "filename": "%PPC_PATH%\ultradrop\hotels_by_zone3.txt",
        "length": 6053,
        "md5": "55434271bcd0c7414dead7ba9ecbd914"
      },
      {
        "filename": "%PPC_PATH%\ultradrop\hotels_by_zone.txt",
        "length": 6053,
        "md5": "55434271bcd0c7414dead7ba9ecbd914"
      }
    ]
  }

GET /api/v1/ultradrop_files/available
Returns a list of ultradrop files that are associated with projects in the user's account.

Returns a list of ultradrop files that are associated with projects in the user’s account.

The filenames are for files that are referenced by one or more of the projects in the user’s account. Uploading a matching filename will update the resource that is used in each project that references the filename.

{
    "status": "success",
    "message": "success",
    "result": [
      "%PPC_PATH%\Ultradrop\hotels_by_zone.txt",
      "%PPC_PATH%\Ultradrop\cities.txt"
    ]
}

GET /api/v1/ultradrop_files/count
Returns the number of ultradrop files that have been uploaded.

Returns the number of ultradrop files that have been uploaded.


GET /api/v1/ultradrop_files/:id
Returns a hash of attributes for the ultradrop file

Fetch the definition of an Ultradrop File including the following attributes:
  • id - Unique identifier for this ultradrop file.
  • filename - The unique filename for the ultradrop file.
  • length - File size in bytes.
  • md5 - md5 encoded hash of the file.

Example JSON object:

{
  "id": "1234",
  "filename": "%PPC_PATH%\ultradrop\hotels_by_zone.txt",
  "length": 6273,
  "md5": "1b2619e7b73e33c4d088eeae3bd06c70"
}

Params

Param name Description
id
required

The unique id of the ultradrop file

Validations:

  • Must be a String


GET /api/v1/ultradrop_files/:id/download
Download the content of the ultradrop file using the file's id

Fetch an ultradrop file from the database using the file’s id.

If a file is found with the given filename, the contents of the ultradrop file will be the result.

Params

Param name Description
id
required

The unique id for the ultradrop file

Validations:

  • Must be a String


GET /api/v1/ultradrop_files/download?filename=:filename
Download the content of the ultradrop file using the filename

Fetch an ultradrop file from the database using the file’s filename. Since these filenames often contain characters outside the ASCII set, the filename will have to be converted into a valid ASCII format using URL encoding.

If a file is found with the given filename, the contents of the ultradrop file will be the result.

Params

Param name Description
filename
required

The URI Encoded filename of the ultradrop file

Validations:

  • Must be a String


PUT /api/v1/ultradrop_files/upload?filename=:filename
Upload a new .txt file for an available ultradrop file

Upload an ultradrop file to the database using the file’s filename. Since these filenames often contain characters outside the ASCII set, the filename will have to be converted into a valid ASCII format using URL encoding.

On a successful call, a standard JSON response will be returned with the a json result matching the format:

{
    "status": "success",
    "message": "success",
    "result": {
      "filename": "%PPC_PATH%\ultradrop\hotels_by_zone.txt",
      "length": 6053,
      "md5": "55434271bcd0c7414dead7ba9ecbd914"
    }
}

Params

Param name Description
filename
required

The URI Encoded filename of the ultradrop file

Validations:

  • Must be a String


DELETE /api/v1/ultradrop_files/:id
Delete an ultradrop file from the database

The ultradrop file will be deleted from the database.

On a successful call, a standard JSON response will be returned with the a json result matching the format:

{
    "status": "success",
    "message": "success",
    "result": "%PPC_PATH%\ultradrop\hotels_by_zone.txt"
}

Params

Param name Description
id
required

The unique id for the ultradrop file

Validations:

  • Must be a String


GET /api/v1/ultradrop_files/:id/xml_schema
Get the XML Schema for the specified Ultradrop File using the id.

Params

Param name Description
id
required

The unique id for the ultradrop file

Validations:

  • Must be a String


GET /api/v1/ultradrop_files/:id/xml_data_set
Get the XML Schema Dataset for the specified Ultradrop File using the id.

Params

Param name Description
id
required

The unique id for the ultradrop file

Validations:

  • Must be a String