How to create a new project folder for your projects.
Endpoint
https://api.platform.easytranslate.com/laas/api/v1/teams/:team_name/folders
In order to create a new project folder, you need to send a POST request.
In your request's header, you need to add your access token, to do so, simply add "Authorization" as a key and "Bearer {{ACCESS_TOKEN}}" (instead of {{ACCESS_TOKEN}}, you should provide your access token). You also need to specify that json should be accepted. To do so, add "Accept" as a key and "application/json" as its value.
You then need to add a variable to your endpoint path:
-
- Team_name: {{TEAM_NAME}}
Instead of {{TEAM_NAME}} in the request example below, you need to provide the team_name of your team. It can be retrieved from the api/v1/user endpoint, as part of the account for which this project should be created.
- Team_name: {{TEAM_NAME}}
Finally, you need to add the following data in the body of your request:
{
"data": {
"type": "project-folder",
"attributes": {
"name": "Superhero stuff"
}
}
}
Only the name value needs to be changed (instead of "Superhero stuff"), you can simply add the name you wish to give to your new folder.
Request example
curl --location --request POST 'https://api.platform.easytranslate.com/laas/api/v1/teams/{{TEAM_NAME}}/folders' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
--data-raw '{
"data": {
"type": "project-folder",
"attributes": {
"name": "Superhero stuff"
}
}
}'
Response example
This is how the response of your request would look like:
{
"data": {
"type": "project-folder",
"id": "8a5e2e24-5a19-4a98-8a16-2ddff207ac23",
"attributes": {
"name": "Superhero stuff",
"total_projects": 0,
"created_at": "2020-08-27T10:33:06.000000Z",
"updated_at": "2020-08-27T10:33:06.000000Z"
},
"relationships": []
},
"meta": {
"copyright": "Copyright 2020 EasyTranslate A/S",
"environment": "sandbox"
}
}