Skip to content

Managed service issue history #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 202 additions & 2 deletions src/data/endpoints/managed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endpoints:
name:
description: The contact's full name.
type: String
limit: "1-64 characters"
limit: 1-64 characters
email:
description: The email address for the contact.
type: String
Expand All @@ -49,7 +49,6 @@ endpoints:
"group": "Support",
}' \
https://$api_root/$version/managed/contacts

/managed/contacts/$id:
group: Contacts
type: resource
Expand Down Expand Up @@ -81,3 +80,204 @@ endpoints:
"group": "Developers"
}' \
https://$api_root/$version/account/oauth-clients/$client_id
#/managed/history:
# group: History
# type: resource
# description: >
# A list of the issues created from monitoring your Services.
# methods:
# GET:
# response: ManagedHistory
# description: >
# Returns your managed service issue history list.
# examples:
# curl: |
# curl -H "Authorization: Bearer $TOKEN" \
# https://$api_root/$version/managed/history
/managed/services:
group: Services
type: resource
description: >
A list of the service monitors your account may access.
methods:
GET:
response: ManagedService
description: >
Returns your managed services list.
examples:
curl: |
curl https://$api_root/$version/managed/services
POST:
description: >
Registers a new service to monitor.
params:
label:
description: A unique label for the service.
type: String
limit: 3-64 characters
service_type:
description: Which service type being used.
type: String
value: url
address:
description: The URL to request. If service_type is TCP, must include port number. For example, tcp://monitor.example.org:23
type: String
value: https://monitor.example.org
timeout:
description: Response must be received before this timeout or an alert will be triggered.
value: 30
limit: 1-255
body:
description: Response must contain this string or an alert will be triggered.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

body is optional according to the blueprint

type: String
value: Success!
limit: 0-100 chracters
optional: true
consultation_group:
description: If we need help along the way, we'll contact someone from this group.
value: Support
limit: 0-50 characters
optional: true
region:
description: Required if address is a private IP, otherwise not used.
type: String
value: us-east-1a
notes:
description: We'll refer to these instructions when responding to a service-related issue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait do we even mark these as optional in the endpoints yaml?

type: String
value: If the Linode needs to be rebooted, please contact us first.
limit: 0-1000 characters
optional: true
examples:
curl: |
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "NewMonitor",
"service_type": "url",
"address": "https://monitor.example.org",
"timeout": 30,
"consultation_group": "Support",
"region": "us-east-1a",
"body": "Success!",
"notes": "Please contact us if the Linode must be rebooted",
"credentials": 12345,23456,34567
}' \
https://$api_root/$version/managed/contacts
/managed/services/$id:
group: Services
type: resource
authenticated: true
description: >
Manage a particular Managed service your account may access.
methods:
GET:
response: ManagedService
description: >
Returns information about this service.
examples:
curl: |
curl -H "Authorization: Bearer $TOKEN" \
https://$api_root/$version/managed/services/$service_id
/managed/credentials:
group: Credentials
type: resource
description: >
Manage your managed service credentials list.
methods:
GET:
response: ManagedCredential
description: >
Returns your credentials list.
examples:
curl: |
curl https://$api_root/$version/managed/credentials
POST:
description: >
Registers a new credential.
params:
label:
type: String
limit: 2-75 characters
description: >
A unique label describing the credential being added.
username:
type: String
optional: true
description: >
An optional login username.
password:
type: String
description: >
A password or passphrase that provides access.
examples:
curl: |
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "MyCredential",
"username": "myusername",
"pasword": "mypassword",
}' \
https://$api_root/$version/managed/credentials
/managed/credentials/$id:
group: Credentials
type: resource
authenticated: true
description: >
Manage a particular Managed service credential your account may access.
methods:
GET:
response: ManagedCredential
description: >
Returns information about this credential.
examples:
curl: |
curl -H "Authorization: Bearer $TOKEN" \
https://$api_root/$version/managed/credential/$credential_id
PUT:
description: >
Edits this credential.
examples:
curl: |
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "MyNewCredential",
"username": "myusername2",
}' \
https://$api_root/$version/managed/credentials/$credential_id
/managed/credentials/$id/password:
group: Credentials
type: resource
authenticated: true
description: >
Change the password for a credential.
methods:
POST:
response: ManagedCredential
description: >
Changes the password for a credential.
examples:
curl: |
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"pasword": "mypassword",
}' \
https://$api_root/$version/managed/credentials/$credential_id/password
/managed/credentials/$id/revoke:
group: Credentials
type: resource
authenticated: true
description: >
Revokes a credential.
methods:
POST:
description: >
Revokes a credential.
examples:
curl: |
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
https://$api_root/$version/managed/credentials/$credential_id/revoke
1 change: 0 additions & 1 deletion src/data/objects/event.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ schema:
description: >
The action that caused this event.
username:
type: String
type: String
value: example_user
description: >
Expand Down
4 changes: 4 additions & 0 deletions src/data/objects/managedcontact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ prefix: managed/contacts
description: >
A list of people we can contact if we require further information regarding your Managed service.
schema:
id:
type: Integer
value: 123
description: This contact's ID.
name:
value: John Q. Public
type: String
Expand Down
35 changes: 35 additions & 0 deletions src/data/objects/managedcredential.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# vim: set et ts=2 sw=2 tw=80 :
name: ManagedCredential
prefix: managed/credentials
description: >
Managed Service credential objects describe monitoring service credentials associated with a service.
schema:
id:
type: Integer
value: 123
description: >
This credential's ID.
label:
type: String
value: CredentialLabel
description: >
A unique Label describing the credential.
username:
type: String
value: myusername
description: >
An optional login username.
last_decryption:
type: Object
description: >
The username and datetime of the last login using this credential.
who:
type: String
value: myusername
description: >
The username of the last successful login.
when:
type: Datetime
value: 2017-10-31T11:12:21
description: >
The datetime of the last successful login.
122 changes: 122 additions & 0 deletions src/data/objects/managedhistory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# vim: set et ts=2 sw=2 tw=80 :
name: ManagedHistory
prefix: managed/history
description: >
Managed History objects describe support ticket issues that have occurred while subscribed to your Managed service.
schema:
created:
type: Datetime
value: 2017-10-31T11:12:21
entity:
description: >
Displays information related to the type of issue being monitored by your Service.
id:
type: Integer
value: 1234567
type:
type: String
value: ticket
description: >
The type of service issue being reported.
label:
type: String
value: Could not connect to URL
description: >
A summary of the issue being reported.
url:
type: String
value: /support/tickets/1234567
description: >
The endpoint URI related to the Support Ticket that was created.
service:
description: >
Displays information related to the Service being monitored.
id:
type: Integer
value: 111
updated:
type: Datetime
value: 2017-10-31T22:34:50
status:
type: Enum
subtype: ManagedServiceStatus
value: "active"
description: >
Describes the status of your Service.
label:
type: String
value: myLabel
description: >
Describes the Service you want monitored.
type:
type: Enum
subtype: ManagedServiceType
value: "url"
description: >
Describes the type of monitoring you want.
body:
type: String
value: String to match.
description: >
Response must contain this string or an alert will be triggered.
method:
type: Enum
subtype: ManagedServiceMethod
value: "get"
description: >
The method by which the URL is accessed.
#TODO credentials:
created:
type: Datetime
value: 2017-10-31T19:20:33
consultation_group:
type: String
value: Support Manager
description: >
If we need help along the way, we'll contact someone from this group.
path:
type: String
value: /
description: >
Defaults to "/" for url.
url:
type: String
value: https://mydomain.domain.com/
description: >
The URL to request.
timeout:
type: Integer
value: 10
description: >
Response must be received before this timeout or an alert will be triggered.
port:
type: Integer
value: 80
description: >
Defaults to 80 if HTTP/TCP, 443 if HTTPS
protocol:
type: Enum
subtype: ManagedServiceProtocol
value: "https"
description: >
Defaults to HTTP in URL mode, TCP in TCP mode.
domain:
type: String
value: mydomain.domain.com
description: >
The domain name of the URL to request.
enums:
ManagedServiceStatus:
new: A newly-created Service.
active: An active Service to monitor.
disabled: A disabled Service to monitor.
ManagedServiceType:
url: Monitor a specific URL.
tcp: Monitor a port via TCP.
ManagedServiceMethod:
get: Monitor a specific URL/port via GET.
post: Monitor a specific URL/port via POST.
ManagedServiceProtocol:
http: HTTP
https: HTTPS
tcp: TCP
Loading