# Nutzung von custom-fields via API für Gitlab awork sync-\> falscher Body

**URL:** <https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535>\
**Category:** Developer Forum\
**Created:** [3. Januar 2025 um 07:38 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535 "2025-01-03T07:38:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jim.wilken](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@jim.wilken](https://community.awork.com/u/jim.wilken)\
**Post date:** [3. Januar 2025 um 07:38 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/1 "2025-01-03T07:38:57Z")

</div>

Sehr geehrtes awork-Team,

ich plane, GitLab-Tickets mit awork-Aufgaben zu synchronisieren und nutze dafür [Make.com](http://Make.com). Die Erstellung neuer Aufgaben in awork basierend auf GitLab-Tickets funktioniert bereits. Nun möchte ich Updates bestehender Aufgaben umsetzen, stoße dabei jedoch auf folgende Probleme:

1. Mapping mit Custom Fields: Ich habe die Custom Fields GitLab-Issue-ID und GitLab-Issue-Linkerstellt, um ihre IDs für das Mapping zu verwenden. Der API-Endpunkt `https://api.awork.com/api/v1/projects/:projectId/customfielddefinitions` liefert jedoch nur HTML-Code der Website statt des erwarteten JSON-Bodys. Ich erhalte jedoch Status 200.
2. Best Practices: Gibt es eine empfohlene Methode zur Synchronisation bestehender GitLab-Tickets mit awork?
3. Alternative Ansätze: Ist die Nutzung von Custom Fields sinnvoll oder gibt es bessere Lösungen?

---

<div class="post-metadata">

**Author:** ![Nils](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/nils/32/96_2.png) [@Nils](https://community.awork.com/u/Nils)\
**Post date:** [3. Januar 2025 um 07:50 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/2 "2025-01-03T07:50:02Z")

</div>

Hi @jim.wilken ,

that sounds like a good approach. We are doing the same for our internal github integration. 😉

The endpoint is the right one and should work. Could you paste the curl so i can check for typos? If you go to the settings page of a project you should see in the network tab in the browser the same call.

Best

Nils

---

<div class="post-metadata">

**Author:** ![jim.wilken](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@jim.wilken](https://community.awork.com/u/jim.wilken)\
**Post date:** [3. Januar 2025 um 08:39 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/3 "2025-01-03T08:39:14Z")

</div>

> [@jim.wilken](#):
>
> [https://api.awork.com/api/v1/projects/:projectId/customfielddefinition](https://api.awork.com/api/v1/projects/:projectId/customfielddefinition)

Hey Nils! Here are the Informations. I have the rights to create, delete and modify customfields.

Input:

[  
{  
„url“: „[https://api.awork.com/api/v1/projects/79641839-2bd2-4455-80ee-1b9564643771/customfielddefinitions](https://api.awork.com/api/v1/projects/79641839-2bd2-4455-80ee-1b9564643771/customfielddefinitions)“,  
„method“: „GET“,  
„headers“: [  
{  
„key“: „Content-Type“,  
„value“: „application/json“  
}  
]  
}  
]

the Authorization is done by [make.com](http://make.com) directly. so no need for extra headers. works withother api endpoints just fine.

Output:

[  
{  
„body“: „\n\<html lang= (…)  
n\n\n“,  
„headers“: {  
„date“: „Fri, 03 Jan 2025 08:35:27 GMT“,  
„content-type“: „text/html; charset=UTF-8“,  
„transfer-encoding“: „chunked“,  
„connection“: „close“,  
„cache-control“: „no-store“,  
„expires“: „0“,  
„set-cookie“: [  
„aw\_lg=3xp9nO0=; [domain=.awork.com](http://domain=.awork.com); path=/; expires=Fri, 03 Jan 2025 08:45:27 GMT; httponly; Secure; SameSite=None“  
],  
„access-control-allow-origin“: „\*“,  
„strict-transport-security“: „max-age=31536000; includeSubDomains“,  
„x-xss-protection“: „1; mode=block“,  
„x-content-type-options“: „nosniff“,  
„referrer-policy“: „origin-when-cross-origin“,  
„x-frame-options“: „ALLOW-FROM [https://teams.microsoft.com/](https://teams.microsoft.com/)“,  
„permissions-policy“: „geolocation=()“,  
„reporting-endpoints“: „csp-endpoint="/csp-reports?v=7&ngsw-bypass=true"“,  
„content-security-policy“: "base-uri ‚self‘; frame-ancestors ‚self‘

(…)  
},  
„statusCode“: 200  
}  
]

---

<div class="post-metadata">

**Author:** ![Nils](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/nils/32/96_2.png) [@Nils](https://community.awork.com/u/Nils)\
**Post date:** [3. Januar 2025 um 08:49 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/4 "2025-01-03T08:49:25Z")

</div>

@jim.wilken i replayed the call to the url provided and it works for me. What kind of html do you see?

---

<div class="post-metadata">

**Author:** ![jim.wilken](https://avatars.discourse-cdn.com/v4/letter/j/9d8465/32.png) [@jim.wilken](https://community.awork.com/u/jim.wilken)\
**Post date:** [3. Januar 2025 um 08:54 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/6 "2025-01-03T08:54:18Z")

</div>

the HTMl for the website 🙂

„body“: "\n\<html lang="en" translate="no"\>\n\n\n\<link rel="preconnect" href="[https://use.typekit.net](https://use.typekit.net)" crossorigin\>\<base href="/"\>\n \n \<meta charset="utf-8"/\>\n \<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/

---

<div class="post-metadata">

**Author:** ![Nils](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/nils/32/96_2.png) [@Nils](https://community.awork.com/u/Nils)\
**Post date:** [3. Januar 2025 um 09:48 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/7 "2025-01-03T09:48:58Z")

</div>

@jim.wilken we can still not find anything in our logging. Is the html you are seeing from our website or our awork webapp? can you send the complete html to [nils@awork.com](mailto:nils@awork.com)?

Best

Nils

---

<div class="post-metadata">

**Author:** ![Nils](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/nils/32/96_2.png) [@Nils](https://community.awork.com/u/Nils)\
**Post date:** [3. Januar 2025 um 09:50 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/8 "2025-01-03T09:50:47Z")

</div>

> [@jim.wilken](#):
>
> [https://api.awork.com/api/v1/projects/:projectId/customfielddefinition](https://api.awork.com/api/v1/projects/:projectId/customfielddefinition)

And you once now wrote [https://api.awork.com/api/v1/projects/:projectId/customfielddefinition](https://api.awork.com/api/v1/projects/:projectId/customfielddefinition) this url, which is not correct (missing the ‚s‘). Can you double check which url you are using?

---

<div class="post-metadata">

**Author:** ![Nils](https://dub1.discourse-cdn.com/flex013/user_avatar/community.awork.com/nils/32/96_2.png) [@Nils](https://community.awork.com/u/Nils)\
**Post date:** [3. Januar 2025 um 12:04 UTC](https://community.awork.com/t/nutzung-von-custom-fields-via-api-fuer-gitlab-awork-sync-falscher-body/2535/9 "2025-01-03T12:04:06Z")

</div>

For the next person with the same problem: In [make.com](http://make.com) the paths needs to be relative without the base url. This was the problem in this case.
