diff options
| author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-06-25 14:19:07 +0200 |
|---|---|---|
| committer | John Villalovos <john@sodarock.com> | 2022-06-25 07:46:06 -0700 |
| commit | 522ecffdb6f07e6c017139df4eb5d3fc42a585b7 (patch) | |
| tree | 359fecb17776d8809c67a35c5e574fa55f259c5b /docs/gl_objects | |
| parent | 194b6be7ccec019fefc04754f98b9ec920c29568 (diff) | |
| download | gitlab-522ecffdb6f07e6c017139df4eb5d3fc42a585b7.tar.gz | |
docs(projects): document 404 gotcha with unactivated integrations
Diffstat (limited to 'docs/gl_objects')
| -rw-r--r-- | docs/gl_objects/projects.rst | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/docs/gl_objects/projects.rst b/docs/gl_objects/projects.rst index fcf55e6..7569d74 100644 --- a/docs/gl_objects/projects.rst +++ b/docs/gl_objects/projects.rst @@ -628,7 +628,23 @@ Reference Examples --------- -Get a service:: +.. danger:: + + Since GitLab 13.12, ``get()`` calls to project services return a + ``404 Not Found`` response until they have been activated the first time. + + To avoid this, we recommend using `lazy=True` to prevent making + the initial call when activating new services unless they have + previously already been activated. + +Configure and enable a service for the first time:: + + service = project.services.get('asana', lazy=True) + + service.api_key = 'randomkey' + service.save() + +Get an existing service:: service = project.services.get('asana') # display its status (enabled/disabled) @@ -642,11 +658,6 @@ List the code names of available services (doesn't return objects):: services = project.services.available() -Configure and enable a service:: - - service.api_key = 'randomkey' - service.save() - Disable a service:: service.delete() |
