Open michaelchunn opened 5 years ago
@michaelchunn
This is how I did it:
1) Create a Personal Access Token at Bugsnag
2) Retrieve company info with curl
Replace <your-token>
with the one created in step 1.
Run in terminal:
curl --get 'https://api.bugsnag.com/user/organizations' \
--header 'Authorization: token <your-token>' \
--header 'X-Version: 2'
Response:
[
{
"id": "<company-id>",
"name": "Example",
"slug": "example",
...
}
]
Grab the company slug
and id
.
3) Retrieve project information with curl
Replace <company-id>
and <your-token>
with data from step 1 & 2.
curl --get 'https://api.bugsnag.com/organizations/<company-id>/projects' \
--header 'Authorization: token <your-token>' \
--header 'X-Version: 2'
Response:
[
{
"id": "<project-id>",
"slug": "my-project",
"name": "My Project",
...
},
...
]
Search for your project name and grab the id
.
4) Fill .env
# Nova Bugsnag
NOVA_BUGSNAG_API_KEY=<your-token>
NOVA_BUGSNAG_PROJECT_ID=<project-id>
NOVA_BUGSNAG_ACCOUNT_SLUG=<company-slug>
Hope this helps.
The curl command did not return a response for me.
It'll be nice to add this to the README file. I was looking for it too.
Can you explain what these should be? Is the api_key the same that I use with the bugsnag project or it it the key generated by personal auth tokens? Is the project_id the name of the project in bugsnag? What is the account_slug?