forked from DataDog/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
360 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from datadog import initialize, api | ||
|
||
options = { | ||
'api_key': '9775a026f1ca7d1c6c5af9d94d9595a4', | ||
'app_key': '87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
} | ||
|
||
initialize(**options) | ||
|
||
# Create user | ||
api.User.create(handle='test@datadoghq.com', name='test user') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'rubygems' | ||
require 'dogapi' | ||
|
||
api_key='9775a026f1ca7d1c6c5af9d94d9595a4' | ||
app_key='87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
|
||
dog = Dogapi::Client.new(api_key, app_key) | ||
|
||
dog.create_user(:handle => 'test@datadoghq.com', :name => 'test user') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
api_key=9775a026f1ca7d1c6c5af9d94d9595a4 | ||
app_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff | ||
|
||
curl -X POST -H "Content-type: application/json" \ | ||
-d '{"handle":"test@datadoghq.com","name":"test user"}' \ | ||
"https://app.datadoghq.com/api/v1/user?api_key=${api_key}&application_key=${app_key}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
api_key=9775a026f1ca7d1c6c5af9d94d9595a4 | ||
app_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff | ||
user=test@datadoghq.com | ||
|
||
curl -X DELETE "https://app.datadoghq.com/api/v1/user/${user}?api_key=${api_key}&application_key=${app_key}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from datadog import initialize, api | ||
|
||
options = { | ||
'api_key': '9775a026f1ca7d1c6c5af9d94d9595a4', | ||
'app_key': '87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
} | ||
|
||
initialize(**options) | ||
|
||
# Get all users | ||
api.User.get_all() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'rubygems' | ||
require 'dogapi' | ||
|
||
api_key='9775a026f1ca7d1c6c5af9d94d9595a4' | ||
app_key='87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
|
||
dog = Dogapi::Client.new(api_key, app_key) | ||
|
||
dog.get_all_users() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
api_key=9775a026f1ca7d1c6c5af9d94d9595a4 | ||
app_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff | ||
|
||
curl -X GET "https://app.datadoghq.com/api/v1/user?api_key=${api_key}&application_key=${app_key}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from datadog import initialize, api | ||
|
||
options = { | ||
'api_key': '9775a026f1ca7d1c6c5af9d94d9595a4', | ||
'app_key': '87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
} | ||
|
||
initialize(**options) | ||
|
||
# Get one user | ||
api.User.get('test@datadoghq.com') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require 'rubygems' | ||
require 'dogapi' | ||
|
||
api_key='9775a026f1ca7d1c6c5af9d94d9595a4' | ||
app_key='87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
|
||
dog = Dogapi::Client.new(api_key, app_key) | ||
|
||
dog.get_user('test@datadoghq.com') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
api_key=9775a026f1ca7d1c6c5af9d94d9595a4 | ||
app_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff | ||
user=test@datadoghq.com | ||
|
||
curl -X GET "https://app.datadoghq.com/api/v1/user/${user}?api_key=${api_key}&application_key=${app_key}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from datadog import initialize, api | ||
|
||
options = { | ||
'api_key': '9775a026f1ca7d1c6c5af9d94d9595a4', | ||
'app_key': '87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
} | ||
|
||
initialize(**options) | ||
|
||
# Update user | ||
api.User.update('test@datadoghq.com', name='alt name', email='test+1@datadoghq.com') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Make sure you replace the API and or APP key below with the ones for your account | ||
require 'rubygems' | ||
require 'dogapi' | ||
|
||
api_key='9775a026f1ca7d1c6c5af9d94d9595a4' | ||
app_key='87ce4a24b5553d2e482ea8a8500e71b8ad4554ff' | ||
|
||
dog = Dogapi::Client.new(api_key, app_key) | ||
|
||
dog.update_user('test@datadoghq.com', :email => 'test+1@datadoghq.com', :name => 'alt name') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
api_key=9775a026f1ca7d1c6c5af9d94d9595a4 | ||
app_key=87ce4a24b5553d2e482ea8a8500e71b8ad4554ff | ||
user=test@datadoghq.com | ||
|
||
curl -X PUT -H "Content-type: application/json" \ | ||
-d '{"email":"test+1@datadoghq.com","name":"alt user"}' \ | ||
"https://app.datadoghq.com/api/v1/user/${user}?api_key=${api_key}&application_key=${app_key}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{'user': {'verified': False, 'name': 'test user', 'disabled': False, 'role': None, 'is_admin': False, 'handle': 'test@datadoghq.com', 'email': 'test@datadoghq.com'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["200", {"user"=>{"handle"=>"test@datadoghq.com", "name"=>"test user", "verified"=>false, "disabled"=>false, "role"=>nil, "is_admin"=>false, "email"=>"test@datadoghq.com"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"user": {"handle": "test@datadoghq.com", "name": "test user", "verified": false, "disabled": false, "role": null, "is_admin": false, "email": "test@datadoghq.com"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{'message': 'User test@datadoghq.com disabled'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["200", {"message"=>"User test@datadoghq.com disabled"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"message": "User test@datadoghq.com disabled"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{'users': [{'verified': False, 'name': 'test user', 'disabled': False, 'role': None, 'is_admin': False, 'handle': 'test@datadoghq.com', 'email': 'test@datadoghq.com'}, {'verified': False, 'name': 'alt name', 'disabled': False, 'role': None, 'is_admin': False, 'handle': 'test2@datadoghq.com', 'email': 'test+1@datadoghq.com'}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["200", {"users"=>[{"handle"=>"test@datadoghq.com", "name"=>"test user", "verified"=>false, "disabled"=>false, "role"=>nil, "is_admin"=>false, "email"=>"test@datadoghq.com"}, {"handle"=>"test2@datadoghq.com", "name"=>"alt name", "verified"=>false, "disabled"=>false, "role"=>nil, "is_admin"=>false, "email"=>"test+1@datadoghq.com"}]}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"users": [{"handle": "test@datadoghq.com", "name": "test user", "verified": false, "disabled": false, "role": null, "is_admin": false, "email": "test@datadoghq.com"},{"handle": "test2@datadoghq.com", "name": "alt name", "verified": false, "disabled": false, "role": null, "is_admin": false, "email": "test+1@datadoghq.com"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{'user': {'verified': False, 'name': 'test user', 'disabled': False, 'role': None, 'is_admin': False, 'handle': 'test@datadoghq.com', 'email': 'test@datadoghq.com'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["200", {"user"=>{"handle"=>"test@datadoghq.com", "name"=>"test user", "verified"=>false, "disabled"=>false, "role"=>nil, "is_admin"=>false, "email"=>"test@datadoghq.com"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"user": {"handle": "test@datadoghq.com", "name": "test user", "verified": false, "disabled": false, "role": null, "is_admin": false, "email": "test@datadoghq.com"}} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{'user': {'verified': False, 'name': 'alt name', 'disabled': False, 'role': None, 'is_admin': False, 'handle': 'test@datadoghq.com', 'email': 'test+1@datadoghq.com'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["200", {"user"=>{"handle"=>"test@datadoghq.com", "name"=>"alt name", "verified"=>false, "disabled"=>false, "role"=>nil, "is_admin"=>false, "email"=>"test+1@datadoghq.com"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"user": {"handle": "test@datadoghq.com", "name": "alt user", "verified": false, "disabled": false, "role": null, "is_admin": false, "email": "test+1@datadoghq.com"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.