Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6c97d98e
Commit
6c97d98e
authored
Jan 13, 2020
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test case for 404 and refactor docs as per feedback
parent
f8f7eb04
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
doc/api/error_tracking.md
doc/api/error_tracking.md
+5
-5
lib/api/error_tracking.rb
lib/api/error_tracking.rb
+1
-0
spec/requests/api/error_tracking_spec.rb
spec/requests/api/error_tracking_spec.rb
+16
-0
No files found.
doc/api/error_tracking.md
View file @
6c97d98e
# Error Tracking
S
ettings API
# Error Tracking
s
ettings API
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/34940) in GitLab 12.7.
## Error Tracking
Project S
ettings
## Error Tracking
project s
ettings
The
Project Settings API allows you to retrieve Error Tracking Settings for a P
roject. Only for project maintainers.
The
project settings API allows you to retrieve the Error Tracking settings for a p
roject. Only for project maintainers.
###
Retrieve Error Tracking S
ettings
###
Get Error Tracking s
ettings
```
GET /projects/:id/error_tracking/settings
...
...
@@ -14,7 +14,7 @@ GET /projects/:id/error_tracking/settings
| Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- |
|
`id`
| integer | yes | The ID o
f the project
owned by the authenticated user |
|
`id`
| integer | yes | The ID o
r
[
URL-encoded path of the project
](
README.md#namespaced-path-encoding
)
owned by the authenticated user |
```
bash
curl
--header
"PRIVATE-TOKEN: <your_access_token>"
https://gitlab.example.com/api/v4/projects/1/error_tracking/settings
...
...
lib/api/error_tracking.rb
View file @
6c97d98e
...
...
@@ -10,6 +10,7 @@ module API
resource
:projects
,
requirements:
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
do
desc
'Get error tracking settings for the project'
do
detail
'This feature was introduced in GitLab 12.7.'
success
Entities
::
ErrorTracking
::
ProjectSetting
end
...
...
spec/requests/api/error_tracking_spec.rb
View file @
6c97d98e
...
...
@@ -29,6 +29,22 @@ describe API::ErrorTracking do
end
end
context
'without a project setting'
do
let
(
:project
)
{
create
(
:project
)
}
before
do
project
.
add_maintainer
(
user
)
end
it
'returns 404'
do
make_request
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
expect
(
json_response
[
'message'
])
.
to
eq
(
'404 Error Tracking Setting Not Found'
)
end
end
context
'when authenticated as reporter'
do
before
do
project
.
add_reporter
(
user
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment