awork-io / awork

The awork Github repo supports you with awork integration and api questions. Here you can find links to further documentation, a FAQ with the most frequently asked questions and great code examples to get started even faster.
https://www.awork.com
11 stars 0 forks source link

[Question]: How does my API call need to look like to create a project from a template? #147

Closed julianwitzel closed 1 year ago

julianwitzel commented 1 year ago

I need help using the awork API and make.com

I'd like to create a project from a template when a new client joins.

Therefore I am using make.com and try to get my settings right.

I am sending it to: https://api.awork.io/api/projects via post

This is my code so far:

{
  "name": "TEST MAKE",
  "isPrivate": false,
  "description": "My project description",
  "startDate": "2023-09-15T00:00:00Z",
  "dueDate": "2032-10-01T00:00:00Z",
  "companyId": "ID_OF_CLIENT_COMPANY_IN_AWORK",
  "projectTemplateId": "ID_OF_MY_AWORK_TEMPLATE",
  "publicProjectTemplateId": "ID_OF_MY_AWORK_TEMPLATE"
}

This is what I get back:

<!DOCTYPE html>
<html>
<head>
<title>awork</title>
<meta charset="UTF-8" />
 <script type="text/javascript">
 const url = window.location.href.replace('awork.io', 'awork.com');
 window.location.replace(url);
 </script>
</head>
<body>
<p>awork has moved to awork.com. Redirecting...</p>
</body>
</html>

Do you have a trace id of the call?

No response

nilzzzzzz commented 1 year ago

@julianwitzel needs to be https://api.awork.io/api/v1/projects , the v1 was missing. The public project template can be removed, should be the other property

nilzzzzzz commented 1 year ago

And better use .com, the io domain will be removed in january.

julianwitzel commented 1 year ago

Amazing! Thank you, that worked :)