solarwinds-itsm-api-definitions 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/definitions/common/components.json +14 -4
- data/lib/definitions/common/schemas/incident.json +24 -0
- data/lib/definitions/openapi.json +2 -2
- data/lib/definitions/paths/incidents/incident_by_id.json +44 -0
- data/lib/resolved_schema/resolved_schema.json +1 -1
- data/lib/solarwinds/itsm/api/definitions.rb +2 -1
- metadata +3 -4
- data/lib/definitions/common/sites_and_departments.json +0 -6
- data/lib/definitions/paths/content/incidents.json +0 -58
- data/lib/definitions/paths/paths.json +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a03b8190147dd03b0db9d6f1120adc48594553abcf972ad4737532e7c02252f0
|
4
|
+
data.tar.gz: c8d648c126c1e70935e4036161adab4de50499dcf790e12c9979c63002ca52dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a96c5f0e89fa96dd01d3f8fdfe8d9565e3e721cb0778f1fd32c09a23980abb5a1e644c9cb2f5abf53535297801541553b74fae1debafae95f39de42267702ca0
|
7
|
+
data.tar.gz: 8dfcab24066a68bf7db27704383af97b8fb93b6fc72e08c4c310dbfca2cae5f7dd095a9d2f21aad290f61c37d67996ade617d8c9195f34d35ad9104821a7aa87
|
@@ -12,22 +12,32 @@
|
|
12
12
|
"in": "path",
|
13
13
|
"schema": { "oneOf": [{ "type": "string" }, { "type": "integer" }] },
|
14
14
|
"required": true,
|
15
|
-
"description": "Numeric ID of the
|
15
|
+
"description": "Numeric ID of the object to get or update"
|
16
16
|
}
|
17
17
|
},
|
18
18
|
"schemas": {
|
19
|
+
"association_by_id": {
|
20
|
+
"oneOf": [{ "type": "string" }, { "type": "integer" }]
|
21
|
+
},
|
19
22
|
"association_by_name": {
|
20
23
|
"type": "object",
|
21
24
|
"oneOf": [{
|
22
25
|
"type": "object",
|
23
26
|
"properties": {
|
24
|
-
"name": { "type": "string", "required": true }
|
27
|
+
"name": { "type": "string", "required": ["true"] }
|
25
28
|
}
|
26
29
|
},
|
27
30
|
{ "enum": ["nil", "", null] }]
|
28
31
|
},
|
29
|
-
"
|
30
|
-
"
|
32
|
+
"association_by_email": {
|
33
|
+
"type": "object",
|
34
|
+
"oneOf": [{
|
35
|
+
"type": "object",
|
36
|
+
"properties": {
|
37
|
+
"email": { "type": "string", "required": ["true"] }
|
38
|
+
}
|
39
|
+
},
|
40
|
+
{ "enum": ["nil", "", null] }]
|
31
41
|
}
|
32
42
|
}
|
33
43
|
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"components": {
|
3
|
+
"schemas": {
|
4
|
+
"incident": {
|
5
|
+
"type": "object",
|
6
|
+
"properties": {
|
7
|
+
"incident": {
|
8
|
+
"type": "object",
|
9
|
+
"properties": {
|
10
|
+
"site": { "$ref": "../components.json#/components/schemas/association_by_name" },
|
11
|
+
"site_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
12
|
+
"department": { "$ref": "../components.json#/components/schemas/association_by_name" },
|
13
|
+
"department_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
14
|
+
"description": { "type": "string" },
|
15
|
+
"state": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
16
|
+
"assignee": { "$ref": "../components.json#/components/schemas/association_by_email" },
|
17
|
+
"assignee_id": { "$ref": "../components.json#/components/schemas/association_by_id" }
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"info": {
|
4
4
|
"title": "SolarWinds ITSM API",
|
5
5
|
"description": "All SolarWinds ITSM API definitions",
|
6
|
-
"version": "0.0.
|
6
|
+
"version": "0.0.3",
|
7
7
|
"contact": {
|
8
8
|
"name": "API Support",
|
9
9
|
"url": "samanage.com/support",
|
@@ -15,6 +15,6 @@
|
|
15
15
|
{ "url": "https://apieu.samanage.com" }
|
16
16
|
],
|
17
17
|
"paths": {
|
18
|
-
"$ref": "paths/
|
18
|
+
"/incidents/{id}": { "$ref": "paths/incidents/incident_by_id.json" }
|
19
19
|
}
|
20
20
|
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getIncidentById",
|
4
|
+
"description": "Get incident",
|
5
|
+
"parameters": [
|
6
|
+
{ "$ref": "../../common/components.json#/components/parameters/token_param" },
|
7
|
+
{ "$ref": "../../common/components.json#/components/parameters/id_param" }
|
8
|
+
],
|
9
|
+
"responses": {
|
10
|
+
"200": { "description": "Object was returned correctly" },
|
11
|
+
"404": { "description": "Not found" }
|
12
|
+
}
|
13
|
+
},
|
14
|
+
"put": {
|
15
|
+
"operationId": "updateIncidentById",
|
16
|
+
"description": "Update incident with specified fields",
|
17
|
+
"parameters": [
|
18
|
+
{ "$ref": "../../common/components.json#/components/parameters/token_param" },
|
19
|
+
{ "$ref": "../../common/components.json#/components/parameters/id_param" }
|
20
|
+
],
|
21
|
+
"requestBody": {
|
22
|
+
"required": true,
|
23
|
+
"description": "Incident fields to update",
|
24
|
+
"content": {
|
25
|
+
"application/json": {
|
26
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident" },
|
27
|
+
"example": {
|
28
|
+
"value": "{\"incident\":{\"site\":{\"name\":\"SITE NAME\"},\"department_id\":DEPARTMENT-ID,\"description\":\"SOME DESCRIPTION\",\"state\":\"STATE NAME\",\"assignee\":{\"email\":\"EMAIL\"}}}"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"application/xml": {
|
32
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident" },
|
33
|
+
"example": {
|
34
|
+
"value": "<incident><site><name>SITE NAME</name></site><department_id>DEPARTMENT-ID</department_id><description>SOME DESCRIPTION</description><state>STATE NAME</state><assignee><email>EMAIL</email></assignee></incident>"
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"responses": {
|
40
|
+
"200": { "description": "Object was updated correctly" },
|
41
|
+
"404": { "description": "Not found" }
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -1 +1 @@
|
|
1
|
-
{"openapi":"3.0.1","info":{"title":"SolarWinds ITSM API","description":"All SolarWinds ITSM API definitions","version":"0.0.
|
1
|
+
{"openapi":"3.0.1","info":{"title":"SolarWinds ITSM API","description":"All SolarWinds ITSM API definitions","version":"0.0.3","contact":{"name":"API Support","url":"samanage.com/support","email":"support@samanage.com"}},"servers":[{"url":"https://api.samanage.com"},{"url":"https://apieu.samanage.com"}],"paths":{"/incidents/{id}":{"get":{"operationId":"getIncidentById","description":"Get incident","parameters":[{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"string"},{"type":"integer"}]},"required":true,"description":"Numeric ID of the object to get or update"}],"responses":{"200":{"description":"Object was returned correctly"},"404":{"description":"Not found"}}},"put":{"operationId":"updateIncidentById","description":"Update incident with specified fields","parameters":[{"name":"X-Samanage-Authorization","in":"header","schema":{"type":"string"},"example":"Bearer TOKEN"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"string"},{"type":"integer"}]},"required":true,"description":"Numeric ID of the object to get or update"}],"requestBody":{"required":true,"description":"Incident fields to update","content":{"application/json":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"site":{"type":"object","oneOf":[{"type":"object","properties":{"name":{"type":"string","required":["true"]}}},{"enum":["nil","",null]}]},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department":{"type":"object","oneOf":[{"type":"object","properties":{"name":{"type":"string","required":["true"]}}},{"enum":["nil","",null]}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","properties":{"email":{"type":"string","required":["true"]}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}},"example":{"value":"{\"incident\":{\"site\":{\"name\":\"SITE NAME\"},\"department_id\":DEPARTMENT-ID,\"description\":\"SOME DESCRIPTION\",\"state\":\"STATE NAME\",\"assignee\":{\"email\":\"EMAIL\"}}}"}},"application/xml":{"schema":{"type":"object","properties":{"incident":{"type":"object","properties":{"site":{"type":"object","oneOf":[{"type":"object","properties":{"name":{"type":"string","required":["true"]}}},{"enum":["nil","",null]}]},"site_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"department":{"type":"object","oneOf":[{"type":"object","properties":{"name":{"type":"string","required":["true"]}}},{"enum":["nil","",null]}]},"department_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"description":{"type":"string"},"state":{"oneOf":[{"type":"string"},{"type":"integer"}]},"assignee":{"type":"object","oneOf":[{"type":"object","properties":{"email":{"type":"string","required":["true"]}}},{"enum":["nil","",null]}]},"assignee_id":{"oneOf":[{"type":"string"},{"type":"integer"}]}}}}},"example":{"value":"<incident><site><name>SITE NAME</name></site><department_id>DEPARTMENT-ID</department_id><description>SOME DESCRIPTION</description><state>STATE NAME</state><assignee><email>EMAIL</email></assignee></incident>"}}}},"responses":{"200":{"description":"Object was updated correctly"},"404":{"description":"Not found"}}}}}}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'pathname'
|
2
3
|
|
3
4
|
module Solarwinds
|
4
5
|
module Itsm
|
@@ -16,7 +17,7 @@ module Solarwinds
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def self.resolved_schema_path
|
19
|
-
File.join(RESOLVED_DIR, 'resolved_schema.json')
|
20
|
+
File.join(__dir__, RESOLVED_DIR, 'resolved_schema.json')
|
20
21
|
end
|
21
22
|
|
22
23
|
def self.write_resolved_schema(path = RESOLVED_DIR, name = 'resolved_schema.json')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solarwinds-itsm-api-definitions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Goldstein
|
@@ -18,10 +18,9 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- lib/definitions/common/components.json
|
21
|
-
- lib/definitions/common/
|
21
|
+
- lib/definitions/common/schemas/incident.json
|
22
22
|
- lib/definitions/openapi.json
|
23
|
-
- lib/definitions/paths/
|
24
|
-
- lib/definitions/paths/paths.json
|
23
|
+
- lib/definitions/paths/incidents/incident_by_id.json
|
25
24
|
- lib/resolved_schema/resolved_schema.json
|
26
25
|
- lib/solarwinds/itsm/api/definitions.rb
|
27
26
|
homepage: https://rubygems.org/gems/solarwinds-itsm-api-definitions
|
@@ -1,6 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"site": { "$ref": "components.json#/components/schemas/association_by_name" },
|
3
|
-
"site_id": { "$ref": "components.json#/components/schemas/association_by_id" },
|
4
|
-
"department": { "$ref": "components.json#/components/schemas/association_by_name" },
|
5
|
-
"department_id": { "$ref": "components.json#/components/schemas/association_by_id" }
|
6
|
-
}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"/incidents/{id}": {
|
3
|
-
"put": {
|
4
|
-
"operationId": "updateIncidentById",
|
5
|
-
"description": "The update API for incidents in JSON",
|
6
|
-
"parameters": [
|
7
|
-
{ "$ref": "../../common/components.json#/components/parameters/token_param" },
|
8
|
-
{ "$ref": "../../common/components.json#/components/parameters/id_param" }
|
9
|
-
],
|
10
|
-
"requestBody": {
|
11
|
-
"content": {
|
12
|
-
"application/json": {
|
13
|
-
"schema": {
|
14
|
-
"type": "object",
|
15
|
-
"properties": {
|
16
|
-
"incident": {
|
17
|
-
"type": "object",
|
18
|
-
"properties": {
|
19
|
-
"$ref": [
|
20
|
-
"../../common/sites_and_departments.json"
|
21
|
-
],
|
22
|
-
"description": { "type": "string" },
|
23
|
-
"state": { "$ref": "../../common/components.json#/components/schemas/association_by_id" },
|
24
|
-
"assignee": {
|
25
|
-
"type": "object",
|
26
|
-
"oneOf": [{
|
27
|
-
"type": "object",
|
28
|
-
"properties": {
|
29
|
-
"email": {
|
30
|
-
"type": "string",
|
31
|
-
"required": true
|
32
|
-
}
|
33
|
-
}
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"enum": ["nil", "", null]
|
37
|
-
}]
|
38
|
-
},
|
39
|
-
"assignee_id": { "$ref": "../../common/components.json#/components/schemas/association_by_id" }
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
43
|
-
},
|
44
|
-
"examples": {
|
45
|
-
"0": {
|
46
|
-
"value": "{\"incident\":{\"site\":{\"name\":\"SITE-NAME\"},\"department\":{\"name\":\"DEPARTMENT-NAME\"},\"site_id\":SITE-ID,\"department_id\":DEPARTMENT-ID,\"description\":\"SOMEDESCRIPTION\",\"state\":\"SITE-NAME\",\"assignee\":{\"email\":\"EMAIL\"}}}"
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
51
|
-
},
|
52
|
-
"responses": {
|
53
|
-
"200": { "description": "Object was updated correctly" },
|
54
|
-
"404": { "description": "Not found" }
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|