Create a Container
1 min
POST
{{BaseURL}}/repository/container
Path Parameters
- BaseURLstringDefaultBaseURL
Body Parameters
- bodyobjectDefault{ "containerType": "STANDARD", "versionLabel": "1.1", "label": "FWS Standard 1 Label", "name": "FWS Standard 1 Name", "identifier": "STD_100", "therapeuticArea": ["Family Medicine", "Genetic Disease"], "sponsor": "Sponsor Two", "program": "Program One", "protocolID": "pID", "protocolName": "pN", "protocolTitle": "pT", "owner": "a25f6bfe-009e-4c7a-add8-28b70188e50c" }
Responses
200
curl
curl --request POST \
--url {{BaseURL}}/repository/container \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '"{\r\n \"containerType\": \"STANDARD\",\r\n \"versionLabel\": \"1.1\",\r\n \"label\": \"FWS Standard 1 Label\",\r\n \"name\": \"FWS Standard 1 Name\",\r\n \"identifier\": \"STD_100\",\r\n \"therapeuticArea\": [\"Family Medicine\", \"Genetic Disease\"],\r\n \"sponsor\": \"Sponsor Two\",\r\n \"program\": \"Program One\",\r\n \"protocolID\": \"pID\",\r\n \"protocolName\": \"pN\",\r\n \"protocolTitle\": \"pT\",\r\n \"owner\": \"a25f6bfe-009e-4c7a-add8-28b70188e50c\" \r\n}\r\n"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify("{\r\n \"containerType\": \"STANDARD\",\r\n \"versionLabel\": \"1.1\",\r\n \"label\": \"FWS Standard 1 Label\",\r\n \"name\": \"FWS Standard 1 Name\",\r\n \"identifier\": \"STD_100\",\r\n \"therapeuticArea\": [\"Family Medicine\", \"Genetic Disease\"],\r\n \"sponsor\": \"Sponsor Two\",\r\n \"program\": \"Program One\",\r\n \"protocolID\": \"pID\",\r\n \"protocolName\": \"pN\",\r\n \"protocolTitle\": \"pT\",\r\n \"owner\": \"a25f6bfe-009e-4c7a-add8-28b70188e50c\" \r\n}\r\n");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{BaseURL}}/repository/container", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{BaseURL}}/repository/container")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump("{\r\n \"containerType\": \"STANDARD\",\r\n \"versionLabel\": \"1.1\",\r\n \"label\": \"FWS Standard 1 Label\",\r\n \"name\": \"FWS Standard 1 Name\",\r\n \"identifier\": \"STD_100\",\r\n \"therapeuticArea\": [\"Family Medicine\", \"Genetic Disease\"],\r\n \"sponsor\": \"Sponsor Two\",\r\n \"program\": \"Program One\",\r\n \"protocolID\": \"pID\",\r\n \"protocolName\": \"pN\",\r\n \"protocolTitle\": \"pT\",\r\n \"owner\": \"a25f6bfe-009e-4c7a-add8-28b70188e50c\" \r\n}\r\n")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{BaseURL}}/repository/container"
payload = json.dumps("{\r\n \"containerType\": \"STANDARD\",\r\n \"versionLabel\": \"1.1\",\r\n \"label\": \"FWS Standard 1 Label\",\r\n \"name\": \"FWS Standard 1 Name\",\r\n \"identifier\": \"STD_100\",\r\n \"therapeuticArea\": [\"Family Medicine\", \"Genetic Disease\"],\r\n \"sponsor\": \"Sponsor Two\",\r\n \"program\": \"Program One\",\r\n \"protocolID\": \"pID\",\r\n \"protocolName\": \"pN\",\r\n \"protocolTitle\": \"pT\",\r\n \"owner\": \"a25f6bfe-009e-4c7a-add8-28b70188e50c\" \r\n}\r\n")
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
{
"aid": "8a9a1f61-b032-42fc-a3a4-c0f7306910c3",
"version": 1
}