Resource Collection

Get Resource Collection

GET http://localhost/api_v1/targets/:target_name:/resources/

This endpoint allows you to get all resources for a given Target and Token

Path Parameters

NameTypeDescription

target_name

string

Name of the Target

Headers

NameTypeDescription

presqt-source-token

string

User's Target Token

[
        {
            "kind": "container",
            "kind_name": "folder",
            "id": "a02d7b96-a4a9-4521-9913-e3cc68f4d9dc",
            "container": "None",
            "title": "Folder_Name",
            "detail": "http://localhost/api_v1/targets/osf/resources/a02d7b96-a4a9-4521-9913-e3cc68f4d9dc"
        },
        {
            "kind": "item",
            "kind_name": "file",
            "id": "5b305f1b-0da6-4a1a-9861-3bb159d94c96",
            "container": "a02d7b96-a4a9-4521-9913-e3cc68f4d9dc",
            "title": "file.jpg",
            "detail": "http://localhost/api_v1/targets/osf/resources/5b305f1b-0da6-4a1a-9861-3bb159d94c96"
        },...
    ]

Upload Top Level Resource

POST http://localhost/api_v1/targets/:target_name:/resources/

This endpoint allows you to upload a top level resource. For instance, a new project.

Path Parameters

NameTypeDescription

target_name

string

Name of the Target

Headers

NameTypeDescription

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

NameTypeDescription

presqt-file

object

Zip file of the resources to upload

{
    "ticket_number": "some_uuid"
    "message": "The server is processing the request."
}

Last updated