Fork a project
POST
/api/orgs/{org}/projects/{project}/fork
const url = 'https://api-dev.wrktr.com/api/orgs/example/projects/example/fork';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"org":"example","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-dev.wrktr.com/api/orgs/example/projects/example/fork \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "org": "example", "name": "example" }'Copies a project you can read (its default branch) into one of your organizations, as a new private project that remembers where it came from. name defaults to the source’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
project
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Project
Media typeapplication/json
object
Example
{ "visibility": "private", "role": "owner"}Unauthorized
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "Unauthorized"}ProjectNotFound | OrgNotFound
ProjectExists
Media typeapplication/json
object
_tag
required
string
project
required
string
Example
{ "_tag": "ProjectExists"}InvalidInput
Media typeapplication/json
object
_tag
required
string
message
required
string
Example
{ "_tag": "InvalidInput"}