This endpoint allows you to upload a top level resource. For instance, a new project.
Path Parameters
Name
Type
Description
target_name
string
Name of the Target
Headers
Name
Type
Description
duplicate-file-action
string
Flag for handling file duplication. Must be either 'ignore' or 'update'
presqt-destination-token
string
User's token for the destination target
Request Body
Name
Type
Description
presqt-file
object
Zip file of the resources to upload
{
"ticket_number": "some_uuid"
"message": "The server is processing the request."
}
{
"error": "'new_target' does not support the action 'resource_upload'."
}
or
{
"error": "'presqt-destination-token' missing in the request headers."
}
or
{
"error": "The file, 'presqt-file', is not found in the body of the request."
}
or
{
"error": "The file provided, 'presqt-file', is not a zip file."
}
or
{
"error": "The file provided is not in BagIt format."
}
or
{
"error": "Checksums failed to validate."
}
or
{
"error": "'presqt-file-duplicate-action' missing in the request headers."
}
or
{
"error": "'bad_action' is not a valid file_duplicate_action.
The options are 'ignore' or 'update'."
}
or
{
"error": "Project is not formatted correctly. Multiple directories
exist at the top level."
}
or
{
"error": "Project is not formatted correctly. Files exist at the top level."
}
{
"error": "Token is invalid. Response returned a 401 status code."
}
{
"error": "'bad_name' is not a valid Target name."
}