File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -628,7 +628,23 @@ Reference
628628Examples
629629---------
630630
631- Get a service::
631+ .. danger ::
632+
633+ Since GitLab 13.12, ``get() `` calls to project services return a
634+ ``404 Not Found `` response until they have been activated the first time.
635+
636+ To avoid this, we recommend using `lazy=True ` to prevent making
637+ the initial call when activating new services unless they have
638+ previously already been activated.
639+
640+ Configure and enable a service for the first time::
641+
642+ service = project.services.get('asana', lazy=True)
643+
644+ service.api_key = 'randomkey'
645+ service.save()
646+
647+ Get an existing service::
632648
633649 service = project.services.get('asana')
634650 # display its status (enabled/disabled)
@@ -642,11 +658,6 @@ List the code names of available services (doesn't return objects)::
642658
643659 services = project.services.available()
644660
645- Configure and enable a service::
646-
647- service.api_key = 'randomkey'
648- service.save()
649-
650661Disable a service::
651662
652663 service.delete()
You can’t perform that action at this time.
0 commit comments