Update project
curl --request PUT \
--url https://api.dualship.run/api/v1/projects/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Id: <x-workspace-id>' \
--data '
{
"description": "<string>",
"name": "<string>",
"slug": "<string>"
}
'import requests
url = "https://api.dualship.run/api/v1/projects/{id}"
payload = {
"description": "<string>",
"name": "<string>",
"slug": "<string>"
}
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Workspace-Id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({description: '<string>', name: '<string>', slug: '<string>'})
};
fetch('https://api.dualship.run/api/v1/projects/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dualship.run/api/v1/projects/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'name' => '<string>',
'slug' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dualship.run/api/v1/projects/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.dualship.run/api/v1/projects/{id}")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualship.run/api/v1/projects/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-01-15T10:30:00Z",
"description": "API backend for mobile app",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My API Project",
"organization_id": "550e8400-e29b-41d4-a716-446655440001",
"slug": "my-api-project",
"status": "active",
"updated_at": "2024-01-15T10:30:00Z"
}{
"code": "BAD_REQUEST",
"error": "invalid request parameters"
}{
"code": "UNAUTHORIZED",
"error": "unauthorized"
}{
"code": "NOT_FOUND",
"error": "resource not found"
}{
"code": "INTERNAL_ERROR",
"error": "internal server error"
}projects
Update project
Update a project by ID
PUT
/
api
/
v1
/
projects
/
{id}
Update project
curl --request PUT \
--url https://api.dualship.run/api/v1/projects/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Id: <x-workspace-id>' \
--data '
{
"description": "<string>",
"name": "<string>",
"slug": "<string>"
}
'import requests
url = "https://api.dualship.run/api/v1/projects/{id}"
payload = {
"description": "<string>",
"name": "<string>",
"slug": "<string>"
}
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Workspace-Id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({description: '<string>', name: '<string>', slug: '<string>'})
};
fetch('https://api.dualship.run/api/v1/projects/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dualship.run/api/v1/projects/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'name' => '<string>',
'slug' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dualship.run/api/v1/projects/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.dualship.run/api/v1/projects/{id}")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dualship.run/api/v1/projects/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"slug\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2024-01-15T10:30:00Z",
"description": "API backend for mobile app",
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My API Project",
"organization_id": "550e8400-e29b-41d4-a716-446655440001",
"slug": "my-api-project",
"status": "active",
"updated_at": "2024-01-15T10:30:00Z"
}{
"code": "BAD_REQUEST",
"error": "invalid request parameters"
}{
"code": "UNAUTHORIZED",
"error": "unauthorized"
}{
"code": "NOT_FOUND",
"error": "resource not found"
}{
"code": "INTERNAL_ERROR",
"error": "internal server error"
}Authorizations
JWT Bearer token authentication
Headers
Workspace ID
Path Parameters
Project ID
Body
application/json
Project details
Response
Project updated
Project information
Example:
"2024-01-15T10:30:00Z"
Example:
"API backend for mobile app"
Example:
"550e8400-e29b-41d4-a716-446655440000"
Example:
"My API Project"
Example:
"550e8400-e29b-41d4-a716-446655440001"
Example:
"my-api-project"
Example:
"active"
Example:
"2024-01-15T10:30:00Z"
Was this page helpful?
⌘I