Compare commits
206 Commits
label-cjk-
...
add-openap
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f028f54d9e | ||
|
|
9dad6908a9 | ||
|
|
a386dfc1ca | ||
|
|
fab85dafa8 | ||
|
|
955faed919 | ||
|
|
0c8ca6d6b0 | ||
|
|
a5de077e04 | ||
|
|
a1e65cd897 | ||
|
|
5d65f1ffc5 | ||
|
|
b7193a06fd | ||
|
|
bc60d796a3 | ||
|
|
c3ac0a750d | ||
|
|
0f111127a5 | ||
|
|
0f4945621c | ||
|
|
9a477f227b | ||
|
|
218fe9ebdc | ||
|
|
85f39de540 | ||
|
|
5cc3277e2d | ||
|
|
cb47d01f51 | ||
|
|
ee499c1385 | ||
|
|
4ae4af5c10 | ||
|
|
fd32585efc | ||
|
|
e65d11d71e | ||
|
|
c2680334f1 | ||
|
|
1217a02ec1 | ||
|
|
49ecc93dbe | ||
|
|
1735fb6bed | ||
|
|
1a3b22171c | ||
|
|
5e773be260 | ||
|
|
c317a1dc8b | ||
|
|
9401ffc83c | ||
|
|
479a852446 | ||
|
|
36bb91cbc3 | ||
|
|
56e5ab8bc6 | ||
|
|
ad745cc84b | ||
|
|
5a13d5ea6f | ||
|
|
0b065eb7fe | ||
|
|
e2c0e4bc66 | ||
|
|
655b0e6778 | ||
|
|
cd785c9fc3 | ||
|
|
23885f5166 | ||
|
|
e05a0ef565 | ||
|
|
00b9ba2b75 | ||
|
|
f1e3bc9531 | ||
|
|
7360e093b2 | ||
|
|
5f639bc24f | ||
|
|
fd8a8b29b1 | ||
|
|
4e1ef40c05 | ||
|
|
00af0ddff5 | ||
|
|
2467e823a5 | ||
|
|
224642fcb5 | ||
|
|
59518ca2c5 | ||
|
|
dfb7c73069 | ||
|
|
70eccceab3 | ||
|
|
3f69b70367 | ||
|
|
94a0a2f8be | ||
|
|
7e23596ab8 | ||
|
|
3c58a5dd3d | ||
|
|
51789ccbf3 | ||
|
|
6ae4a9aa1a | ||
|
|
0aebd669b2 | ||
|
|
2a92c4899d | ||
|
|
530089895a | ||
|
|
ae8289fc8c | ||
|
|
90f4dfb48b | ||
|
|
ec2eddf538 | ||
|
|
44d31d4b39 | ||
|
|
4934e7666c | ||
|
|
35bf0d020e | ||
|
|
4934dc85ac | ||
|
|
5ceb50d7e5 | ||
|
|
ae7ccbb7bd | ||
|
|
1cd9fc47aa | ||
|
|
013c50607a | ||
|
|
d7bf9b7f2e | ||
|
|
4702fdddc6 | ||
|
|
dd06a530c0 | ||
|
|
c36125dc95 | ||
|
|
ae43f93d0a | ||
|
|
8918b17f77 | ||
|
|
dfd05e8b5b | ||
|
|
3daa6dd051 | ||
|
|
6cf88b1792 | ||
|
|
6b9839367f | ||
|
|
34fcf5d616 | ||
|
|
1cf3c74e67 | ||
|
|
16b57b931e | ||
|
|
3457e7d617 | ||
|
|
edbe8001e6 | ||
|
|
71644c1cbe | ||
|
|
03fd8df8bd | ||
|
|
71d622b6dd | ||
|
|
689d5a2d58 | ||
|
|
b2e9eb866c | ||
|
|
c8b7782d1d | ||
|
|
673f936689 | ||
|
|
2ca0d39e51 | ||
|
|
908c8bc397 | ||
|
|
93082e1e87 | ||
|
|
ef0a6aa25e | ||
|
|
90afec864e | ||
|
|
4bbbd786cd | ||
|
|
a6ded20ede | ||
|
|
9b96314371 | ||
|
|
2ac36cdfd6 | ||
|
|
9404dff79c | ||
|
|
3ed2e2d79e | ||
|
|
f1266ab5d6 | ||
|
|
664e3984e3 | ||
|
|
665c13e238 | ||
|
|
8a667b20c2 | ||
|
|
3693241292 | ||
|
|
3c3acff79b | ||
|
|
e15de83a95 | ||
|
|
636fccbf97 | ||
|
|
7d8ed399a8 | ||
|
|
272385db6c | ||
|
|
291be64aa0 | ||
|
|
72be171917 | ||
|
|
43cd0d7eb3 | ||
|
|
eeea69d8f2 | ||
|
|
bec88a0441 | ||
|
|
6e67e3a8a0 | ||
|
|
947ccf911d | ||
|
|
06f313febe | ||
|
|
b387136b8f | ||
|
|
31614c5da1 | ||
|
|
146b5a3085 | ||
|
|
ff1297cac5 | ||
|
|
8af3cf4056 | ||
|
|
9edec9e212 | ||
|
|
be4362c59a | ||
|
|
8461b147de | ||
|
|
82bdd43168 | ||
|
|
533d82d4d8 | ||
|
|
6f990dd1de | ||
|
|
be848598e3 | ||
|
|
7d0742054f | ||
|
|
dcf7e83507 | ||
|
|
407c2bf0c8 | ||
|
|
c46227ee94 | ||
|
|
d8171eb056 | ||
|
|
c614c44d4c | ||
|
|
8a46579588 | ||
|
|
fb9fb9c097 | ||
|
|
d9399534ce | ||
|
|
17a749bbed | ||
|
|
25ce63f00b | ||
|
|
2462bc05b3 | ||
|
|
c3748da0b1 | ||
|
|
90c242a441 | ||
|
|
52239a88b5 | ||
|
|
7a3596c86d | ||
|
|
ac8a9e38f0 | ||
|
|
5c08f3a27e | ||
|
|
2dc11a84bf | ||
|
|
2960ea15f5 | ||
|
|
17aab4c490 | ||
|
|
59d0f0d292 | ||
|
|
27d13a113a | ||
|
|
c58e999fbb | ||
|
|
a02a96d5c4 | ||
|
|
47e9e4704d | ||
|
|
b2ad9d404e | ||
|
|
5216dd75bf | ||
|
|
b8b45d2d81 | ||
|
|
4b2b2cb68e | ||
|
|
be4ace293e | ||
|
|
764b363bbc | ||
|
|
705474dc14 | ||
|
|
e639d7726b | ||
|
|
9da9166442 | ||
|
|
8ea339f0ef | ||
|
|
e29b0aa6a4 | ||
|
|
d2157868f2 | ||
|
|
89b36ba63f | ||
|
|
1d3dfa1fa4 | ||
|
|
89cfafd933 | ||
|
|
ca567eec8a | ||
|
|
41da31c379 | ||
|
|
e81f63f46b | ||
|
|
ade03e4827 | ||
|
|
33a4c88c3a | ||
|
|
69c5dbfc23 | ||
|
|
cf1bccfd65 | ||
|
|
99acf018f1 | ||
|
|
1f79776b8f | ||
|
|
11e5f851f0 | ||
|
|
4ca1db8a1b | ||
|
|
14b829aa30 | ||
|
|
384652b3df | ||
|
|
9db65c6ae9 | ||
|
|
1346e33e99 | ||
|
|
ab9cc447aa | ||
|
|
cb63c12d2f | ||
|
|
fe9e0444b4 | ||
|
|
6ce0fd20ce | ||
|
|
a18957dbe9 | ||
|
|
13d5b724ee | ||
|
|
06f060161d | ||
|
|
73e0628124 | ||
|
|
7393c4170b | ||
|
|
73e185bf9d | ||
|
|
77153c3e78 | ||
|
|
50e210b2db | ||
|
|
b1de98f05d |
4
.scribe/.filehashes
Normal file
4
.scribe/.filehashes
Normal file
@@ -0,0 +1,4 @@
|
||||
# GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE.
|
||||
# Scribe uses this file to know when you change something manually in your docs.
|
||||
.scribe/intro.md=f325b28dd095cc9f79495c3014b20f70
|
||||
.scribe/auth.md=a1780016c25c90a3c1e981b22cfb10e6
|
||||
7
.scribe/auth.md
Normal file
7
.scribe/auth.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Authenticating requests
|
||||
|
||||
To authenticate requests, include an **`Authorization`** header with the value **`"Bearer your-token"`**.
|
||||
|
||||
All authenticated endpoints are marked with a `requires authentication` badge in the documentation below.
|
||||
|
||||
If your account has API access enabled, you can generate a token by clicking in the top right account menu and clicking <b>API tokens</b>.
|
||||
329
.scribe/endpoints/00.yaml
Normal file
329
.scribe/endpoints/00.yaml
Normal file
@@ -0,0 +1,329 @@
|
||||
name: Account
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/account/requests
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Display Requested Assets'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=qIWm6chVMaJXUcKG9E8EHhnb7F9wQT14AjEraiFE; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/account/eulas
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Display Accepted EULAs'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=nhItaWioeRLO0dKBgjno1X73ttHn50uXRQ7L7BAc; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/account/request/{asset_id}'
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Store Asset Request'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
asset_id:
|
||||
name: asset_id
|
||||
description: 'The ID of the asset.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
asset_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/account/request/{asset_id}/cancel'
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Cancel Asset Request'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
asset_id:
|
||||
name: asset_id
|
||||
description: 'The ID of the asset.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
asset_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/account/personal-access-tokens
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create API token'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/account/personal-access-tokens
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show API tokens'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=yUjH3zpUXM18qZVCvvVEp1y5zfNNok8NctCrwGof; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/account/personal-access-tokens/{tokenId}'
|
||||
metadata:
|
||||
groupName: Account
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete API token'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
tokenId:
|
||||
name: tokenId
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
tokenId: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
2180
.scribe/endpoints/01.yaml
Normal file
2180
.scribe/endpoints/01.yaml
Normal file
File diff suppressed because it is too large
Load Diff
636
.scribe/endpoints/02.yaml
Normal file
636
.scribe/endpoints/02.yaml
Normal file
@@ -0,0 +1,636 @@
|
||||
name: Accessories
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/accessories/{accessory}/checkedout'
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Accessory Checkouts'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
accessory:
|
||||
name: accessory
|
||||
description: 'The accessory.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
accessory: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=QwqPH3txF8T3F17zuocUxlzlAourAOPvfWbLeuj9; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/accessories/{accessory_id}/checkout'
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Checkout Accessory'
|
||||
description: |-
|
||||
If Slack is enabled and/or asset acceptance is enabled, it will also
|
||||
trigger a Slack message and send an email.
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
accessory_id:
|
||||
name: accessory_id
|
||||
description: 'The ID of the accessory.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
accessory_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/accessories/{accessory}/checkin'
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Checkin Accessory'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
accessory:
|
||||
name: accessory
|
||||
description: 'The accessory.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
accessory: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/accessories/selectlist
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'A search term to filter results by name.'
|
||||
required: false
|
||||
example: null
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=kCGqdKxExAZopEwv7oy5l7SRnyqXXXDCU5Jyu7jU; expires=Sat, 18 Oct 2025 20:42:51 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/accessories
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List accessories'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'A search term to filter results by.'
|
||||
required: false
|
||||
example: keyboard
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
'filter[<fieldname>]':
|
||||
name: 'filter[<fieldname>]'
|
||||
description: 'A field to filter by. Example'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
company_id:
|
||||
name: company_id
|
||||
description: 'Filter by company ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
category_id:
|
||||
name: category_id
|
||||
description: 'Filter by category ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
manufacturer_id:
|
||||
name: manufacturer_id
|
||||
description: 'Filter by manufacturer ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
supplier_id:
|
||||
name: supplier_id
|
||||
description: 'Filter by supplier ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
location_id:
|
||||
name: location_id
|
||||
description: 'Filter by location ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
notes:
|
||||
name: notes
|
||||
description: 'Filter by notes.'
|
||||
required: false
|
||||
example: 'For office use only'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
offset:
|
||||
name: offset
|
||||
description: 'The number of items to skip before starting to collect the result set.'
|
||||
required: false
|
||||
example: 0
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
limit:
|
||||
name: limit
|
||||
description: 'The number of items to return.'
|
||||
required: false
|
||||
example: 50
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'The field to sort by.'
|
||||
required: false
|
||||
example: created_at
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'The order to sort by.'
|
||||
required: false
|
||||
example: desc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: keyboard
|
||||
'filter[<fieldname>]': architecto
|
||||
company_id: 1
|
||||
category_id: 1
|
||||
manufacturer_id: 1
|
||||
supplier_id: 1
|
||||
location_id: 1
|
||||
notes: 'For office use only'
|
||||
offset: 0
|
||||
limit: 50
|
||||
sort: created_at
|
||||
order: desc
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=2HABGaRbPqMGeiNPKWTPnN0AwM4t7W2yN4TFOJqm; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/accessories
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Accessory'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
name:
|
||||
name: name
|
||||
description: 'The name of the accessory.'
|
||||
required: true
|
||||
example: 'Apple Bluetooth Keyboard'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
qty:
|
||||
name: qty
|
||||
description: 'The number of accessories to create.'
|
||||
required: true
|
||||
example: 10
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
category_id:
|
||||
name: category_id
|
||||
description: 'The ID of the category to assign this accessory to.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
image:
|
||||
name: image
|
||||
description: ''
|
||||
required: false
|
||||
example: null
|
||||
type: file
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
name: 'Apple Bluetooth Keyboard'
|
||||
qty: 10
|
||||
category_id: 1
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/accessories/{id}'
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Accessory'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the accessory.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=1Tv5gekmNofKNDwolDkOEcEH9JUfM9rX0PaTFfWI; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/accessories/{id}'
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update accessory.'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the accessory.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/accessories/{id}'
|
||||
metadata:
|
||||
groupName: Accessories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Accessory'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the accessory.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
306
.scribe/endpoints/03.yaml
Normal file
306
.scribe/endpoints/03.yaml
Normal file
@@ -0,0 +1,306 @@
|
||||
name: Categories
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/categories/{item_type}/selectlist'
|
||||
metadata:
|
||||
groupName: Categories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
item_type:
|
||||
name: item_type
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
item_type: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=Wy5FSLyBn1xpLQy08hVrBlmoANJohF4ZIzpEcIZy; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/categories
|
||||
metadata:
|
||||
groupName: Categories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Categories'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=ErvltKvHZdVobMWCabFa83cWRCOTTtIgAPf7kLWS; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/categories
|
||||
metadata:
|
||||
groupName: Categories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Category'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/categories/{id}'
|
||||
metadata:
|
||||
groupName: Categories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Category'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the category.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=V2YFWiG0waCLFesMFr3kkLb0Io41yz4MPzVEfytq; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/categories/{id}'
|
||||
metadata:
|
||||
groupName: Categories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Category'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the category.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/categories/{id}'
|
||||
metadata:
|
||||
groupName: Categories
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Category'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the category.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
295
.scribe/endpoints/04.yaml
Normal file
295
.scribe/endpoints/04.yaml
Normal file
@@ -0,0 +1,295 @@
|
||||
name: Companies
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/companies/selectlist
|
||||
metadata:
|
||||
groupName: Companies
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=IqjgsK1DVTQS5qlZI7l96rTJH0m95aILfWx6eAS2; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/companies
|
||||
metadata:
|
||||
groupName: Companies
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Companies'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=cEVlfAwtjQtu004rU9aEgFwcozHbApb3l0gEpL3C; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/companies
|
||||
metadata:
|
||||
groupName: Companies
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Company'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/companies/{id}'
|
||||
metadata:
|
||||
groupName: Companies
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Company'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the company.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=YqczMPKZfCp7CKkULGsRoDqufIWQ9yGkni3Cto4R; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/companies/{id}'
|
||||
metadata:
|
||||
groupName: Companies
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Company'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the company.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/companies/{id}'
|
||||
metadata:
|
||||
groupName: Companies
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Company'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the company.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
394
.scribe/endpoints/05.yaml
Normal file
394
.scribe/endpoints/05.yaml
Normal file
@@ -0,0 +1,394 @@
|
||||
name: Departments
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/departments/selectlist
|
||||
metadata:
|
||||
groupName: Departments
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=0Ld2mnJEdBRIaREXQ37xGTuIS9SWJ4pT3WC79wc3; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/departments
|
||||
metadata:
|
||||
groupName: Departments
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Departments'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results.'
|
||||
required: false
|
||||
example: IT
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Filter by exact department name.'
|
||||
required: false
|
||||
example: IT
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
company_id:
|
||||
name: company_id
|
||||
description: 'Filter by exact company ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
manager_id:
|
||||
name: manager_id
|
||||
description: 'Filter by exact manager (user) ID. Example:'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
location_id:
|
||||
name: location_id
|
||||
description: 'Filter by exact location ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'Column to sort results by. Allowed values: id, name, image, users_count, notes, created_at, updated_at, location, manager, company. Default: created_at.'
|
||||
required: false
|
||||
example: name
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
|
||||
required: false
|
||||
example: asc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
offset:
|
||||
name: offset
|
||||
description: 'Offset/starting position of the results. Default: 0.'
|
||||
required: false
|
||||
example: 0
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
limit:
|
||||
name: limit
|
||||
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
|
||||
required: false
|
||||
example: 50
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: IT
|
||||
name: IT
|
||||
company_id: 1
|
||||
manager_id: 16
|
||||
location_id: 1
|
||||
sort: name
|
||||
order: asc
|
||||
offset: 0
|
||||
limit: 50
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=A3I9GYZHlismQEeDjfx7XM9EFccWImskxth6x9OH; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/departments
|
||||
metadata:
|
||||
groupName: Departments
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Department'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/departments/{id}'
|
||||
metadata:
|
||||
groupName: Departments
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Department'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the department.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=f5nA1I31NqT4m4T3BeSDmKt2LuBQs7KtcZZNRDKq; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/departments/{id}'
|
||||
metadata:
|
||||
groupName: Departments
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Department'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the department.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/departments/{id}'
|
||||
metadata:
|
||||
groupName: Departments
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Department'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the department.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
419
.scribe/endpoints/06.yaml
Normal file
419
.scribe/endpoints/06.yaml
Normal file
@@ -0,0 +1,419 @@
|
||||
name: Components
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/components/{component}/assets'
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Component Assets'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
component:
|
||||
name: component
|
||||
description: 'The component.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
component: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=wiPOiV7Xae1fyzS2Jv3w9d060WDRgnET70IrBjTj; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/components/{id}/checkin'
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Checkin Component'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the component.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/components/{id}/checkout'
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Checkout Component'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the component.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
assigned_to:
|
||||
name: assigned_to
|
||||
description: 'The <code>id</code> of an existing record in the assets table.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
assigned_qty:
|
||||
name: assigned_qty
|
||||
description: ''
|
||||
required: false
|
||||
example: null
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
assigned_to: architecto
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/components
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Categories'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=vXpBDH4e4puagaeAOAWHnpHEOQ7rCwXKeEDeGn5W; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/components
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Component'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/components/{id}'
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Component'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the component.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=mIFtURJNZowrCIpSMAMYNVYW5XvKIReOCIJ57XgL; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/components/{id}'
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Component'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the component.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/components/{id}'
|
||||
metadata:
|
||||
groupName: Components
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Component'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the component.'
|
||||
required: true
|
||||
example: 3
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 3
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
535
.scribe/endpoints/07.yaml
Normal file
535
.scribe/endpoints/07.yaml
Normal file
@@ -0,0 +1,535 @@
|
||||
name: Consumables
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/consumables/selectlist
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=9SzZeaG6J8yoJtsrcqY5kJPcLvX7ObZeYK0JivkB; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/consumables/{id}/users'
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'User Assignments'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the consumable.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=eO7NKRGNCHJ34NL6woGI5Ux80o2tg9rIBW0LuGGd; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/consumables/{consumable}/checkout'
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Checkout Consumable'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
consumable:
|
||||
name: consumable
|
||||
description: 'The consumable.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
consumable: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/consumables
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Consumables'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
filter:
|
||||
name: filter
|
||||
description: 'A JSON encoded array of key/value pairs to filter results by.'
|
||||
required: false
|
||||
example: '{"company":"1","location":"2"}'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
search:
|
||||
name: search
|
||||
description: 'A search term to filter results by.'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Filter by exact name.'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
company_id:
|
||||
name: company_id
|
||||
description: 'Filter by exact company ID.'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
category_id:
|
||||
name: category_id
|
||||
description: 'Filter by exact category ID.'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
model_number:
|
||||
name: model_number
|
||||
description: 'Filter by exact model number.'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
manufacturer_id:
|
||||
name: manufacturer_id
|
||||
description: 'Filter by exact manufacturer ID.'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
supplier_id:
|
||||
name: supplier_id
|
||||
description: 'Filter by exact supplier ID.'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
location_id:
|
||||
name: location_id
|
||||
description: 'Filter by exact location ID.'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
notes:
|
||||
name: notes
|
||||
description: 'Filter by exact notes.'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'The column to sort results by. Must be one of the following: id, name, order_number, min_amt, purchase_date, purchase_cost, company, category, model_number, item_no, manufacturer, location, qty, image, company, location, category, supplier, manufacturer. Default is created_at.'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'The order to sort results by. Must be one of the following: asc, desc. Default is desc.'
|
||||
required: false
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
filter: '{"company":"1","location":"2"}'
|
||||
search: architecto
|
||||
name: architecto
|
||||
company_id: 16
|
||||
category_id: 16
|
||||
model_number: architecto
|
||||
manufacturer_id: 16
|
||||
supplier_id: 16
|
||||
location_id: 16
|
||||
notes: architecto
|
||||
sort: architecto
|
||||
order: architecto
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=WMv6quPUXaLnZTkEXk5aBwdTDMuUgt7fQTd6uLZf; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/consumables
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Store a newly created resource in storage.'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/consumables/{id}'
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Consumable'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the consumable.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=oTfWSAjrq9p5g7qEYt7eFY4Dl7io060HverF1daF; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/consumables/{id}'
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Consumable'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the consumable.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/consumables/{id}'
|
||||
metadata:
|
||||
groupName: Consumables
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Consumable'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the consumable.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
244
.scribe/endpoints/08.yaml
Normal file
244
.scribe/endpoints/08.yaml
Normal file
@@ -0,0 +1,244 @@
|
||||
name: Depreciations
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/depreciations
|
||||
metadata:
|
||||
groupName: Depreciations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Depreciations'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=TaZAI56rS9h74YByHlSA9ZrXGsTjQD4onwKaqiFF; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/depreciations
|
||||
metadata:
|
||||
groupName: Depreciations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Depreciation'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/depreciations/{depreciation_id}'
|
||||
metadata:
|
||||
groupName: Depreciations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Depreciation'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
depreciation_id:
|
||||
name: depreciation_id
|
||||
description: 'The ID of the depreciation.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
depreciation_id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=qFky4u180BfuHQB1d4a5A7K5Q4MOHcVdqELFA4ow; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/depreciations/{depreciation_id}'
|
||||
metadata:
|
||||
groupName: Depreciations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Depreciation'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
depreciation_id:
|
||||
name: depreciation_id
|
||||
description: 'The ID of the depreciation.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
depreciation_id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/depreciations/{depreciation_id}'
|
||||
metadata:
|
||||
groupName: Depreciations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Depreciation'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
depreciation_id:
|
||||
name: depreciation_id
|
||||
description: 'The ID of the depreciation.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
depreciation_id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
726
.scribe/endpoints/09.yaml
Normal file
726
.scribe/endpoints/09.yaml
Normal file
@@ -0,0 +1,726 @@
|
||||
name: 'Custom Fields'
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/fields/fieldsets/{id}/order'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Reorder Fields'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the fieldset.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/fields/{field}/associate'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Add Field to Fieldset'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
field:
|
||||
name: field
|
||||
description: 'The field.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
field: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/fields/{field}/disassociate'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Remove Field from Fieldset'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
field:
|
||||
name: field
|
||||
description: 'The field.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
field: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/fields
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Custom Fields'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=MTrOxDhLsWMBw1aLYKK9q1GA3VjT43PhCRp7KBa9; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/fields
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Field'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/fields/{field}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Field'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
field:
|
||||
name: field
|
||||
description: 'The field.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
field: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=jdlBn85i46xp3MdUb7Dbb1igonFqeCNdzQwTOmnl; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/fields/{field}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Field'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
field:
|
||||
name: field
|
||||
description: 'The field.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
field: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/fields/{field}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Field'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
field:
|
||||
name: field
|
||||
description: 'The field.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
field: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/fieldsets/{fieldset}/fields'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'Show Fields in Fieldset'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
fieldset:
|
||||
name: fieldset
|
||||
description: 'The fieldset.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
fieldset: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/fieldsets/{fieldset}/fields/{model}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'Fields in Fieldset with Default Values for Model'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
fieldset:
|
||||
name: fieldset
|
||||
description: 'The fieldset.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
model:
|
||||
name: model
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
fieldset: architecto
|
||||
model: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/fieldsets
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'List Fieldsets'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=DtH1Q5VV2HTu9NhlX5CxdYBImN4ZqxolMxRmhDyk; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/fieldsets
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'Create Fieldset'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/fieldsets/{id}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'Show Fieldset and Fields'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the fieldset.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=haApTgbAdDCFdvIN3hU8DshPXbfKMRdlXqBMBKdM; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/fieldsets/{id}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'Update Fieldset'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the fieldset.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/fieldsets/{id}'
|
||||
metadata:
|
||||
groupName: 'Custom Fields'
|
||||
groupDescription: ''
|
||||
subgroup: 'Custom Fieldsets'
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Fieldset'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the fieldset.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
244
.scribe/endpoints/10.yaml
Normal file
244
.scribe/endpoints/10.yaml
Normal file
@@ -0,0 +1,244 @@
|
||||
name: 'User Groups'
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/groups
|
||||
metadata:
|
||||
groupName: 'User Groups'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Display a listing of the resource.'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=evRZVbrjaLPlDGuAmSjuQxAfBkaXVVI3h6YJ8xCC; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/groups
|
||||
metadata:
|
||||
groupName: 'User Groups'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Group'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/groups/{id}'
|
||||
metadata:
|
||||
groupName: 'User Groups'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Group'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the group.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=lUFcyrjpTiMJiziJCYaZzhxr9o4YDOHuJhtyxe9O; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/groups/{id}'
|
||||
metadata:
|
||||
groupName: 'User Groups'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Group'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the group.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/groups/{id}'
|
||||
metadata:
|
||||
groupName: 'User Groups'
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Remove the specified resource from storage.'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the group.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
354
.scribe/endpoints/11.yaml
Normal file
354
.scribe/endpoints/11.yaml
Normal file
@@ -0,0 +1,354 @@
|
||||
name: Maintenances
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/maintenances
|
||||
metadata:
|
||||
groupName: Maintenances
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Maintenances'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results.'
|
||||
required: false
|
||||
example: repair
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
asset_id:
|
||||
name: asset_id
|
||||
description: 'Filter by exact asset ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
supplier_id:
|
||||
name: supplier_id
|
||||
description: 'Filter by exact supplier ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
created_by:
|
||||
name: created_by
|
||||
description: 'Filter by exact user ID who created the maintenance. Example'
|
||||
required: false
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'Filter by exact URL.'
|
||||
required: false
|
||||
example: 'http://example.com'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
asset_maintenance_type:
|
||||
name: asset_maintenance_type
|
||||
description: 'Filter by exact maintenance type.'
|
||||
required: false
|
||||
example: repair
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'Column to sort results by. Allowed values: id, name, asset_maintenance_time, asset_maintenance_type, cost, start_date, completion_date, notes, asset_tag, asset_name, serial, created_by, supplier, location, is_warranty, status_label. Default: created_at.'
|
||||
required: false
|
||||
example: name
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
|
||||
required: false
|
||||
example: asc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
offset:
|
||||
name: offset
|
||||
description: 'Offset/starting position of the results. Default: 0.'
|
||||
required: false
|
||||
example: 0
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
limit:
|
||||
name: limit
|
||||
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
|
||||
required: false
|
||||
example: 50
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: repair
|
||||
asset_id: 1
|
||||
supplier_id: 1
|
||||
created_by: 16
|
||||
url: 'http://example.com'
|
||||
asset_maintenance_type: repair
|
||||
sort: name
|
||||
order: asc
|
||||
offset: 0
|
||||
limit: 50
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=HIPWn994ZVwWTllISCuyT1n0vLjhvE6GtJdyvVt5; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/maintenances
|
||||
metadata:
|
||||
groupName: Maintenances
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Maintenance'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/maintenances/{id}'
|
||||
metadata:
|
||||
groupName: Maintenances
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'View Maintenance'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the maintenance.'
|
||||
required: true
|
||||
example: 2
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 2
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=SMRgTfJyiKW4MwqoQkxPhRwZ7s0NG6iXfqrgvOF3; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/maintenances/{id}'
|
||||
metadata:
|
||||
groupName: Maintenances
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Maintenance'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the maintenance.'
|
||||
required: true
|
||||
example: 2
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 2
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/maintenances/{id}'
|
||||
metadata:
|
||||
groupName: Maintenances
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Maintenance'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the maintenance.'
|
||||
required: true
|
||||
example: 2
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 2
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
181
.scribe/endpoints/12.yaml
Normal file
181
.scribe/endpoints/12.yaml
Normal file
@@ -0,0 +1,181 @@
|
||||
name: Imports
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/imports/process/{import}'
|
||||
metadata:
|
||||
groupName: Imports
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Process Import'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
import:
|
||||
name: import
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
import: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/imports
|
||||
metadata:
|
||||
groupName: Imports
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Import Files'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=lj8o7doJNMvuEIVNyZKehmNRHGnHDPN2afmwMD6i; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/imports
|
||||
metadata:
|
||||
groupName: Imports
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Save Import File'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/imports/{id}'
|
||||
metadata:
|
||||
groupName: Imports
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Import File'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the import.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
116
.scribe/endpoints/13.yaml
Normal file
116
.scribe/endpoints/13.yaml
Normal file
@@ -0,0 +1,116 @@
|
||||
name: Labels
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/labels/{name}'
|
||||
metadata:
|
||||
groupName: Labels
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Label'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
name:
|
||||
name: name
|
||||
description: ''
|
||||
required: true
|
||||
example: '|{+-0p'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
name: '|{+-0p'
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=rEUcrmsA92vKXWOMa9gjkZircoRHtwh2NGzh46Ym; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/labels
|
||||
metadata:
|
||||
groupName: Labels
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Labels'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=uOfOzJMa5lIhRnkxrSV7W6Lh6At2caeav8pgRq3i; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
576
.scribe/endpoints/14.yaml
Normal file
576
.scribe/endpoints/14.yaml
Normal file
@@ -0,0 +1,576 @@
|
||||
name: Licenses
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/licenses/selectlist
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=WCUA668q64Tb6nEAAMH6QDj0KxiWwfnKfCVC1WL5; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/licenses
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Licenses'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
status:
|
||||
name: status
|
||||
description: 'Filter by license status. Options: active, inactive, expiring'
|
||||
required: false
|
||||
example: '?status=active'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
company_id:
|
||||
name: company_id
|
||||
description: 'Filter by exact company ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Filter by exact license name.'
|
||||
required: false
|
||||
example: 'Microsoft 365'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
product_key:
|
||||
name: product_key
|
||||
description: 'Filter by exact product key.'
|
||||
required: false
|
||||
example: W269N
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order_number:
|
||||
name: order_number
|
||||
description: 'Filter by exact order number.'
|
||||
required: false
|
||||
example: '12345'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
purchase_order:
|
||||
name: purchase_order
|
||||
description: 'Filter by exact purchase order.'
|
||||
required: false
|
||||
example: PO12345
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
license_name:
|
||||
name: license_name
|
||||
description: 'Filter by exact licensee name.'
|
||||
required: false
|
||||
example: 'John Doe'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
license_email:
|
||||
name: license_email
|
||||
description: 'Filter by exact licensee email.'
|
||||
required: false
|
||||
example: john.d
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
status: '?status=active'
|
||||
company_id: 1
|
||||
name: 'Microsoft 365'
|
||||
product_key: W269N
|
||||
order_number: '12345'
|
||||
purchase_order: PO12345
|
||||
license_name: 'John Doe'
|
||||
license_email: john.d
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=FsSfFEzLbFI2oqcTFwXV523YHYRteVgVbhwU1KjU; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/licenses
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create License'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/licenses/{license_id}'
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show License'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
license_id:
|
||||
name: license_id
|
||||
description: 'The ID of the license.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
license_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=fr7kJMaaASq4b53DwioCqOIG1A7k7COxiBsYFjXL; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/licenses/{license_id}'
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update License'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
license_id:
|
||||
name: license_id
|
||||
description: 'The ID of the license.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
license_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/licenses/{license_id}'
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete License'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
license_id:
|
||||
name: license_id
|
||||
description: 'The ID of the license.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
license_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/licenses/{license_id}/seats'
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: 'License Seats'
|
||||
subgroupDescription: ''
|
||||
title: 'List License Seats'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
license_id:
|
||||
name: license_id
|
||||
description: 'The ID of the license.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
license_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=StfngPkbKXNpOhusZSc3gJVfFrY1dHeurAa4otwt; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/licenses/{license_id}/seats/{id}'
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: 'License Seats'
|
||||
subgroupDescription: ''
|
||||
title: 'Show License Seat'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
license_id:
|
||||
name: license_id
|
||||
description: 'The ID of the license.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the seat.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
license_id: 1
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=4NcQjrTDkyy5Ps1lwLlvwwkW8zLNdvkt4jLniAbj; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/licenses/{license_id}/seats/{id}'
|
||||
metadata:
|
||||
groupName: Licenses
|
||||
groupDescription: ''
|
||||
subgroup: 'License Seats'
|
||||
subgroupDescription: ''
|
||||
title: 'Update License Seat'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
license_id:
|
||||
name: license_id
|
||||
description: 'The ID of the license.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the seat.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
license_id: 1
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
644
.scribe/endpoints/15.yaml
Normal file
644
.scribe/endpoints/15.yaml
Normal file
@@ -0,0 +1,644 @@
|
||||
name: Locations
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/locations/selectlist
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Gets a paginated collection for the select2 menus'
|
||||
description: |-
|
||||
This is handled slightly differently as of ~4.7.8-pre, as
|
||||
we have to do some recursive magic to get the hierarchy to display
|
||||
properly when looking at the parent/child relationship in the
|
||||
rich menus.
|
||||
|
||||
This means we can't use the normal pagination that we use elsewhere
|
||||
in our selectlists, since we have to get the full set before we can
|
||||
determine which location is parent/child/grandchild, etc.
|
||||
|
||||
This also means that hierarchy display gets a little funky when people
|
||||
use the Select2 search functionality, but there's not much we can do about
|
||||
that right now.
|
||||
|
||||
As a result, instead of paginating as part of the query, we have to grab
|
||||
the entire data set, and then invoke a paginator manually and pass that
|
||||
through to the SelectListTransformer.
|
||||
|
||||
Many thanks to @uberbrady for the help getting this working better.
|
||||
Recursion still sucks, but I guess he doesn't have to get in the
|
||||
sea... this time.
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=UpVwalXoUKqNpdc1JZOoxLIbtfuGTDjmXv2FL0U4; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/locations/{location_id}/assets'
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Assets with Default Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
location_id:
|
||||
name: location_id
|
||||
description: 'The ID of the location.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
location_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=s6eLrXoHfx9aHRHsGokhuXGIfcWMyMK6s8Y7CuQb; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/locations/{location_id}/assigned/assets'
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Assets Assigned to Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
location_id:
|
||||
name: location_id
|
||||
description: 'The ID of the location.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
location_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=6IjNjFVBRoxfcpk3lgt97JCcwcwkJ18MblUUArEa; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/locations/{location_id}/assigned/accessories'
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Accessories Assigned to Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
location_id:
|
||||
name: location_id
|
||||
description: 'The ID of the location.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
location_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=8QVLWPz9VFdTVM9oelFsOvXEnefwKOeIuos7D23G; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/locations
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Locations'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results.'
|
||||
required: false
|
||||
example: Headquarters
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Filter by exact location name.'
|
||||
required: false
|
||||
example: Headquarters
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
address:
|
||||
name: address
|
||||
description: 'Filter by exact address.'
|
||||
required: false
|
||||
example: '123 Main St'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
address2:
|
||||
name: address2
|
||||
description: 'Filter by exact address2.'
|
||||
required: false
|
||||
example: 'Suite 100'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
city:
|
||||
name: city
|
||||
description: 'Filter by exact city.'
|
||||
required: false
|
||||
example: Springfield
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
zip:
|
||||
name: zip
|
||||
description: 'Filter by exact zip code.'
|
||||
required: false
|
||||
example: '12345'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
country:
|
||||
name: country
|
||||
description: 'Filter by exact country.'
|
||||
required: false
|
||||
example: USA
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
manager_id:
|
||||
name: manager_id
|
||||
description: 'Filter by exact manager (user) ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
company_id:
|
||||
name: company_id
|
||||
description: 'Filter by exact company ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
parent_id:
|
||||
name: parent_id
|
||||
description: 'Filter by exact parent location ID.'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
status:
|
||||
name: status
|
||||
description: 'Filter by location status. Allowed values: active, deleted.'
|
||||
required: false
|
||||
example: active
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'Column to sort results by. Allowed values: accessorries_count, address, address2, assets_count, assigned_assets_count, rtd_assets_count, accessories_count, assigned_accessories_count, components_count, consumables_count, users_count, children_count, city, country, created_at, currency, id, image, ldap_ou, company_id, manager_id, name, rtd_assets_count, state, updated_at, zip. Default: created_at.'
|
||||
required: false
|
||||
example: name
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
|
||||
required: false
|
||||
example: asc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: Headquarters
|
||||
name: Headquarters
|
||||
address: '123 Main St'
|
||||
address2: 'Suite 100'
|
||||
city: Springfield
|
||||
zip: '12345'
|
||||
country: USA
|
||||
manager_id: 1
|
||||
company_id: 1
|
||||
parent_id: 1
|
||||
status: active
|
||||
sort: name
|
||||
order: asc
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=OrGO92pRr2bN1MO0HEk74EaOyIBpyNWW8nBBM9w1; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/locations
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/locations/{id}'
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the location.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=r40jhYlCjVborgeetW7XFFJzC3FPckbK3wiqaq9b; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/locations/{id}'
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the location.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/locations/{id}'
|
||||
metadata:
|
||||
groupName: Locations
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Location'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the location.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
462
.scribe/endpoints/16.yaml
Normal file
462
.scribe/endpoints/16.yaml
Normal file
@@ -0,0 +1,462 @@
|
||||
name: Manufacturers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/manufacturers/selectlist
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=wsdZCoP7veaDGNxSgmEVyiIXMCynDJaplPtmclKS; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/manufacturers/{id}/restore'
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Restore Deleted Manufacturer'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the manufacturer.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/manufacturers
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Manufacturers'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results.'
|
||||
required: false
|
||||
example: Dell
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Filter by exact manufacturer name.'
|
||||
required: false
|
||||
example: Dell
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'Filter by exact URL.'
|
||||
required: false
|
||||
example: 'http://example.com'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
support_url:
|
||||
name: support_url
|
||||
description: 'Filter by exact support URL.'
|
||||
required: false
|
||||
example: 'http://support.example.com'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
warranty_lookup_url:
|
||||
name: warranty_lookup_url
|
||||
description: 'Filter by exact warranty lookup URL.'
|
||||
required: false
|
||||
example: 'http://warranty.example.com'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
support_phone:
|
||||
name: support_phone
|
||||
description: 'Filter by exact support phone number.'
|
||||
required: false
|
||||
example: 1-800-555-5555
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
support_email:
|
||||
name: support_email
|
||||
description: 'Filter by exact support email address.'
|
||||
required: false
|
||||
example: support@example.org
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'Column to sort results by. Allowed values: id, name, url, support_url, support_email, warranty_lookup_url, support_phone, created_at, updated_at, assets_count, consumables_count, components_count, licenses_count. Default: created_at.'
|
||||
required: false
|
||||
example: name
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
|
||||
required: false
|
||||
example: asc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
offset:
|
||||
name: offset
|
||||
description: 'Offset/starting position of the results. Default: 0.'
|
||||
required: false
|
||||
example: 0
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
limit:
|
||||
name: limit
|
||||
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
|
||||
required: false
|
||||
example: 50
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: Dell
|
||||
name: Dell
|
||||
url: 'http://example.com'
|
||||
support_url: 'http://support.example.com'
|
||||
warranty_lookup_url: 'http://warranty.example.com'
|
||||
support_phone: 1-800-555-5555
|
||||
support_email: support@example.org
|
||||
sort: name
|
||||
order: asc
|
||||
offset: 0
|
||||
limit: 50
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=hLpuGgLKlkZ3lxAdCVVQh6AknrP7V8ucHP12iJyL; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/manufacturers
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Maintenance'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/manufacturers/{id}'
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Manufacturer'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the manufacturer.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=AihyA0pGOpolpeaHgVkhwxZ48ZIGlH5C4cWn2ky1; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/manufacturers/{id}'
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Manufacturer'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the manufacturer.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/manufacturers/{id}'
|
||||
metadata:
|
||||
groupName: Manufacturers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Manufacturer'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the manufacturer.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
357
.scribe/endpoints/17.yaml
Normal file
357
.scribe/endpoints/17.yaml
Normal file
@@ -0,0 +1,357 @@
|
||||
name: Models
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/models/selectlist
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Selectlist of Models'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=jwtFIyYGPRatDfntlAj40jo0O4Sj0FCnKi976PR2; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/models/assets
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Assets in Model'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the model.'
|
||||
required: true
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 16
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=nvMGTR69fETV88dw8dfKSbREZAJ66IYQUUNSpf7Y; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/models
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Models'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=QArLWCify7SZSmEfdwLa8MuiE73ySbcjczNWAP5t; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/models
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Model'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/models/{id}'
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Model'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the model.'
|
||||
required: true
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 16
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=Fi7bcrWvfZzmZFbGKAT0DPwaht8G2vkcbjoJPdZ1; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/models/{id}'
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Model'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the model.'
|
||||
required: true
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 16
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/models/{id}'
|
||||
metadata:
|
||||
groupName: Models
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Model'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the model.'
|
||||
required: true
|
||||
example: 16
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: 16
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
117
.scribe/endpoints/18.yaml
Normal file
117
.scribe/endpoints/18.yaml
Normal file
@@ -0,0 +1,117 @@
|
||||
name: Notes
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/notes/{asset_id}/store'
|
||||
metadata:
|
||||
groupName: Notes
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Store Note'
|
||||
description: |-
|
||||
Checks authorization for updating assets, validates the presence of the 'note',
|
||||
attempts to find the asset by ID, and creates a new ActionLog entry if successful.
|
||||
Returns JSON responses indicating success or failure with appropriate HTTP status codes.
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
asset_id:
|
||||
name: asset_id
|
||||
description: 'The ID of the asset.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
asset_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/notes/{asset_id}/index'
|
||||
metadata:
|
||||
groupName: Notes
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'List Notes'
|
||||
description: |-
|
||||
Checks authorization to view assets, attempts to find the asset by ID,
|
||||
and fetches related action log entries of type 'note added', including
|
||||
user information for each note. Returns a JSON response with the notes or errors.
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
asset_id:
|
||||
name: asset_id
|
||||
description: 'The ID of the asset.'
|
||||
required: true
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
asset_id: 1
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=0996I9pgG6hTiplyAUfm6hARQqlLp2KcZRKbrsM4; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
398
.scribe/endpoints/19.yaml
Normal file
398
.scribe/endpoints/19.yaml
Normal file
@@ -0,0 +1,398 @@
|
||||
name: Settings
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/settings/ldaptest
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Test LDAP Connection'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=sXQmK1seBet712r1kd4fxKvJ8eS1G5JIQGi7Jk76; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/settings/purge_barcodes
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Barcode Cache'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/settings/login-attempts
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Get a list of login attempts'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=3WvRIFmkRUjvmDyyocP7gGkeVA8nsKCstMlpD2ll; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/settings/ldaptestlogin
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Test LDAP Login'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters:
|
||||
ldaptest_user:
|
||||
name: ldaptest_user
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
ldaptest_password:
|
||||
name: ldaptest_password
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanBodyParameters:
|
||||
ldaptest_user: architecto
|
||||
ldaptest_password: architecto
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/settings/mailtest
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Test Email Configuration'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/settings/backups
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Lists backup files'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=c1LnO2y90g9cXIQdH1B3ALRTwBznlJR0MPn7UYwI; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/settings/backups/download/latest
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Determines and downloads the latest backup'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=h8vmsBd9n2ThBnox919dPAo17WMNdGSmFDgmUWbJ; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/settings/backups/download/{file}'
|
||||
metadata:
|
||||
groupName: Settings
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Downloads a backup file.'
|
||||
description: |-
|
||||
We use response()->download() here instead of Storage::download() because Storage::download()
|
||||
exhausts memory on larger files.
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
file:
|
||||
name: file
|
||||
description: ''
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
file: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=dEPJObU3yZeyRQ0ZNZQmLDg70DDH6mt8OLUoXk7b; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
539
.scribe/endpoints/20.yaml
Normal file
539
.scribe/endpoints/20.yaml
Normal file
@@ -0,0 +1,539 @@
|
||||
name: 'Status Labels'
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/statuslabels/selectlist
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=wkMPeN6kxHTgcy7pBWCmBb2skYp7Ozxo03ll2QRI; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/statuslabels/assets/name
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Show Count for Pie Chart'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=BwSbIkmBBnKEl1eHDB5irvFrSmdOermismgPqdVt; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/statuslabels/assets/type
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Show Count for Pie Chart by Meta Status'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=qgDpluENzw06DYesVDJ62VPNypFZR7TMXA5YuERD; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/statuslabels/{id}/assetlist'
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Show Assets with Status Label'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the statuslabel.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=prHwFCnHCRfbaQBGGsb9zl9HAqpNQVahgTzOn5TU; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/statuslabels/{statuslabel}/deployable'
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Check for Deployable Status'
|
||||
description: |-
|
||||
Returns a boolean response based on whether the status label
|
||||
is one that is deployable or pending.
|
||||
|
||||
This is used by the hardware create/edit view to determine whether
|
||||
we should provide a dropdown of users for them to check the asset out to,
|
||||
and whether we show a warning that the asset will be checked in if it's already
|
||||
assigned but the status is changed to one that isn't pending or deployable
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
statuslabel:
|
||||
name: statuslabel
|
||||
description: 'The statuslabel.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
statuslabel: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=gGlaRILsVZF4fEWWem29LTEhtwQLJo5jRgFzetFi; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/statuslabels
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Show Status Labels'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results.'
|
||||
required: false
|
||||
example: Inventory
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: Inventory
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=wZlTwk63tGu1kRBFJuzb8R1UY1k0ZU2YI5NAAZt8; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/statuslabels
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Store a newly created resource in storage.'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/statuslabels/{id}'
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Show Status Labels'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the statuslabel.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=BoPls7yDoCtaubgDPfK5nEabHin9oYkJpg9vZT3b; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/statuslabels/{id}'
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Update Status Label'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the statuslabel.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/statuslabels/{id}'
|
||||
metadata:
|
||||
groupName: 'Status Labels'
|
||||
groupDescription: ''
|
||||
subgroup: Assets
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Status Label'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the statuslabel.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
482
.scribe/endpoints/21.yaml
Normal file
482
.scribe/endpoints/21.yaml
Normal file
@@ -0,0 +1,482 @@
|
||||
name: Suppliers
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/suppliers/selectlist
|
||||
metadata:
|
||||
groupName: Suppliers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: Selectlist
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=XCddlMqcqKqWUTBwJenBf996h9VUAuQn9onGzMNw; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/suppliers
|
||||
metadata:
|
||||
groupName: Suppliers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Suppliers'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results.'
|
||||
required: false
|
||||
example: Acme
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
name:
|
||||
name: name
|
||||
description: 'Filter by exact supplier name.'
|
||||
required: false
|
||||
example: 'Acme Corp'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
address:
|
||||
name: address
|
||||
description: 'Filter by exact address.'
|
||||
required: false
|
||||
example: '123 Main St'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
address2:
|
||||
name: address2
|
||||
description: 'Filter by exact address2.'
|
||||
required: false
|
||||
example: 'Suite 100'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
city:
|
||||
name: city
|
||||
description: 'Filter by exact city.'
|
||||
required: false
|
||||
example: Springfield
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
state:
|
||||
name: state
|
||||
description: 'Filter by exact state.'
|
||||
required: false
|
||||
example: IL
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
zip:
|
||||
name: zip
|
||||
description: 'Filter by exact zip code.'
|
||||
required: false
|
||||
example: '62701'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
country:
|
||||
name: country
|
||||
description: 'Filter by exact country.'
|
||||
required: false
|
||||
example: USA
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
phone:
|
||||
name: phone
|
||||
description: 'Filter by exact phone number.'
|
||||
required: false
|
||||
example: 555-1234
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
fax:
|
||||
name: fax
|
||||
description: 'Filter by exact fax number.'
|
||||
required: false
|
||||
example: 555-5678
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
email:
|
||||
name: email
|
||||
description: 'Filter by exact email address.'
|
||||
required: false
|
||||
example: info@example.org
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
url:
|
||||
name: url
|
||||
description: 'Filter by exact URL.'
|
||||
required: false
|
||||
example: 'http://example.com'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
notes:
|
||||
name: notes
|
||||
description: 'Filter by exact notes.'
|
||||
required: false
|
||||
example: 'This is a note.'
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'Column to sort results by. Allowed values: id, name, address, address2, city, state, country, zip, phone, contact, fax, email, image, assets_count, licenses_count, accessories_count, components_count, consumables_count, url, notes. Default: created_at.'
|
||||
required: false
|
||||
example: name
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'Order of sorted results. Allowed values: asc, desc. Default: desc.'
|
||||
required: false
|
||||
example: asc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
offset:
|
||||
name: offset
|
||||
description: 'Offset/starting position of the results. Default: 0.'
|
||||
required: false
|
||||
example: 0
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
limit:
|
||||
name: limit
|
||||
description: 'Limit the number of results returned. Default: 25. Maximum: 100.'
|
||||
required: false
|
||||
example: 50
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: Acme
|
||||
name: 'Acme Corp'
|
||||
address: '123 Main St'
|
||||
address2: 'Suite 100'
|
||||
city: Springfield
|
||||
state: IL
|
||||
zip: '62701'
|
||||
country: USA
|
||||
phone: 555-1234
|
||||
fax: 555-5678
|
||||
email: info@example.org
|
||||
url: 'http://example.com'
|
||||
notes: 'This is a note.'
|
||||
sort: name
|
||||
order: asc
|
||||
offset: 0
|
||||
limit: 50
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=R5PUii8mbVR2t8EyWTQHM80dstDyhZxcQR15nKb7; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: api/v1/suppliers
|
||||
metadata:
|
||||
groupName: Suppliers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Create Supplier'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/suppliers/{id}'
|
||||
metadata:
|
||||
groupName: Suppliers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Show Supplier'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the supplier.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=aqFNCFcjAl7hMG1Q0RCnYmK7HTNWcq0kYhd1R9NN; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- PUT
|
||||
- PATCH
|
||||
uri: 'api/v1/suppliers/{id}'
|
||||
metadata:
|
||||
groupName: Suppliers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Update Supplier'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the supplier.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/suppliers/{id}'
|
||||
metadata:
|
||||
groupName: Suppliers
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete Supplier'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the supplier.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
1053
.scribe/endpoints/22.yaml
Normal file
1053
.scribe/endpoints/22.yaml
Normal file
File diff suppressed because it is too large
Load Diff
1117
.scribe/endpoints/23.yaml
Normal file
1117
.scribe/endpoints/23.yaml
Normal file
File diff suppressed because it is too large
Load Diff
207
.scribe/endpoints/24.yaml
Normal file
207
.scribe/endpoints/24.yaml
Normal file
@@ -0,0 +1,207 @@
|
||||
name: Reports
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/reports/activity
|
||||
metadata:
|
||||
groupName: Reports
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Activity Report'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters:
|
||||
search:
|
||||
name: search
|
||||
description: 'Search term to filter results'
|
||||
required: false
|
||||
example: updated
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
target_type:
|
||||
name: target_type
|
||||
description: 'Filter by target type'
|
||||
required: false
|
||||
example: user
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
target_id:
|
||||
name: target_id
|
||||
description: 'Filter by target ID'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
item_type:
|
||||
name: item_type
|
||||
description: 'Filter by item type'
|
||||
required: false
|
||||
example: asset
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
item_id:
|
||||
name: item_id
|
||||
description: 'Filter by item ID'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
action_type:
|
||||
name: action_type
|
||||
description: 'Filter by action type'
|
||||
required: false
|
||||
example: create
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
created_by:
|
||||
name: created_by
|
||||
description: 'Filter by user ID who created the log'
|
||||
required: false
|
||||
example: 1
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
action_source:
|
||||
name: action_source
|
||||
description: 'Filter by action source'
|
||||
required: false
|
||||
example: web
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
remote_ip:
|
||||
name: remote_ip
|
||||
description: 'Filter by remote IP address Example:'
|
||||
required: false
|
||||
example: null
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
uploads:
|
||||
name: uploads
|
||||
description: 'Filter to only show logs with file uploads'
|
||||
required: false
|
||||
example: true
|
||||
type: boolean
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
sort:
|
||||
name: sort
|
||||
description: 'Column to sort by. Allowed values: id, created_at, target_id, created_by, accept_signature, action_type, note, remote_ip, user_agent, target_type, item_type, action_source, action_date. Default is created_at.'
|
||||
required: false
|
||||
example: created_at
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
order:
|
||||
name: order
|
||||
description: 'Order of sorting. Allowed values: asc, desc. Default is desc.'
|
||||
required: false
|
||||
example: desc
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
offset:
|
||||
name: offset
|
||||
description: 'Number of records to skip for pagination. Default is 0.'
|
||||
required: false
|
||||
example: 0
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
limit:
|
||||
name: limit
|
||||
description: 'Maximum number of records to return. Default is 25.'
|
||||
required: false
|
||||
example: 25
|
||||
type: integer
|
||||
enumValues: []
|
||||
exampleWasSpecified: true
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanQueryParameters:
|
||||
search: updated
|
||||
target_type: user
|
||||
target_id: 1
|
||||
item_type: asset
|
||||
item_id: 1
|
||||
action_type: create
|
||||
created_by: 1
|
||||
action_source: web
|
||||
uploads: true
|
||||
sort: created_at
|
||||
order: desc
|
||||
offset: 0
|
||||
limit: 25
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=Q7c7iu2qi9Mil7UrdGdQhd5UHhMHwIs9J7wKxvhY; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
54
.scribe/endpoints/25.yaml
Normal file
54
.scribe/endpoints/25.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Misc
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: api/v1/version
|
||||
metadata:
|
||||
groupName: Misc
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Version API routes'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters: []
|
||||
cleanUrlParameters: []
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=4opUPyEuZlodDlaWWG7JNFN7lCuHNMim1KxZHPur; expires=Sat, 18 Oct 2025 20:42:52 GMT; Max-Age=719999; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
285
.scribe/endpoints/26.yaml
Normal file
285
.scribe/endpoints/26.yaml
Normal file
@@ -0,0 +1,285 @@
|
||||
name: Files
|
||||
description: ''
|
||||
endpoints:
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/{object_type}/{id}/files'
|
||||
metadata:
|
||||
groupName: Files
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'List Files for an Object'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
object_type:
|
||||
name: object_type
|
||||
description: ''
|
||||
required: true
|
||||
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the {object type}.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=HfR9HTwK8SuIGE2OuiaImTbUpBhp1HtUBHMeilHy; expires=Sat, 18 Oct 2025 20:42:53 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- GET
|
||||
uri: 'api/v1/{object_type}/{id}/files/{file_id}'
|
||||
metadata:
|
||||
groupName: Files
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Display File'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
object_type:
|
||||
name: object_type
|
||||
description: ''
|
||||
required: true
|
||||
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the {object type}.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
file_id:
|
||||
name: file_id
|
||||
description: 'The ID of the file.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
id: architecto
|
||||
file_id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses:
|
||||
-
|
||||
status: 401
|
||||
content: '{"error":"Unauthorized or unauthenticated."}'
|
||||
headers:
|
||||
cache-control: 'max-age=0, must-revalidate, no-cache, no-store, private'
|
||||
content-type: application/json
|
||||
vary: Origin
|
||||
pragma: no-cache
|
||||
expires: 'Sun, 02 Jan 1990 00:00:00 GMT'
|
||||
x-content-type-options: nosniff
|
||||
feature-policy: "accelerometer 'none';autoplay 'none';camera 'none';display-capture 'none';document-domain 'none';encrypted-media 'none';fullscreen 'none';geolocation 'none';sync-xhr 'none';usb 'none';xr-spatial-tracking 'none'"
|
||||
referrer-policy: same-origin
|
||||
content-security-policy: "default-src 'self';style-src 'self' 'unsafe-inline';script-src 'self' 'unsafe-inline' 'unsafe-eval';connect-src 'self';object-src 'none';font-src 'self' data:;img-src 'self' data: https://snipe-it.test https://avatars.githubusercontent.com/u/ https://www.google.com/images/branding/googlelogo/2x/ https://snipe-flysystem-public-test.s3-us-west-2.amazonaws.com https://secure.gravatar.com http://gravatar.com maps.google.com maps.gstatic.com *.googleapis.com"
|
||||
set-cookie: 'snipe-dev_local=N688uqN5BWG2WKvT3v6TxAJAl1Il05lzaTycQ40x; expires=Sat, 18 Oct 2025 20:42:53 GMT; Max-Age=720000; path=/; secure; httponly; samesite=lax'
|
||||
description: null
|
||||
custom: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- POST
|
||||
uri: 'api/v1/{object_type}/{id}/files'
|
||||
metadata:
|
||||
groupName: Files
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Upload File to an Object'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
object_type:
|
||||
name: object_type
|
||||
description: ''
|
||||
required: true
|
||||
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the {object type}.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
-
|
||||
httpMethods:
|
||||
- DELETE
|
||||
uri: 'api/v1/{object_type}/{id}/files/{file_id}/delete'
|
||||
metadata:
|
||||
groupName: Files
|
||||
groupDescription: ''
|
||||
subgroup: ''
|
||||
subgroupDescription: ''
|
||||
title: 'Delete File'
|
||||
description: ''
|
||||
authenticated: true
|
||||
deprecated: false
|
||||
custom: []
|
||||
headers:
|
||||
Authorization: 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
Content-Type: application/json
|
||||
Accept: application/json
|
||||
urlParameters:
|
||||
object_type:
|
||||
name: object_type
|
||||
description: ''
|
||||
required: true
|
||||
example: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
id:
|
||||
name: id
|
||||
description: 'The ID of the {object type}.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
file_id:
|
||||
name: file_id
|
||||
description: 'The ID of the file.'
|
||||
required: true
|
||||
example: architecto
|
||||
type: string
|
||||
enumValues: []
|
||||
exampleWasSpecified: false
|
||||
nullable: false
|
||||
custom: []
|
||||
cleanUrlParameters:
|
||||
object_type: accessories|assets|components|consumables|hardware|licenses|locations|maintenances|models|users
|
||||
id: architecto
|
||||
file_id: architecto
|
||||
queryParameters: []
|
||||
cleanQueryParameters: []
|
||||
bodyParameters: []
|
||||
cleanBodyParameters: []
|
||||
fileParameters: []
|
||||
responses: []
|
||||
responseFields: []
|
||||
auth:
|
||||
- headers
|
||||
- Authorization
|
||||
- 'Bearer 6g43cv8PD1aE5beadkZfhV6'
|
||||
controller: null
|
||||
method: null
|
||||
route: null
|
||||
custom: []
|
||||
53
.scribe/endpoints/custom.0.yaml
Normal file
53
.scribe/endpoints/custom.0.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
# To include an endpoint that isn't a part of your Laravel app (or belongs to a vendor package),
|
||||
# you can define it in a custom.*.yaml file, like this one.
|
||||
# Each custom file should contain an array of endpoints. Here's an example:
|
||||
# See https://scribe.knuckles.wtf/laravel/documenting/custom-endpoints#extra-sorting-groups-in-custom-endpoint-files for more options
|
||||
|
||||
#- httpMethods:
|
||||
# - POST
|
||||
# uri: api/doSomething/{param}
|
||||
# metadata:
|
||||
# groupName: The group the endpoint belongs to. Can be a new group or an existing group.
|
||||
# groupDescription: A description for the group. You don't need to set this for every endpoint; once is enough.
|
||||
# subgroup: You can add a subgroup, too.
|
||||
# title: Do something
|
||||
# description: 'This endpoint allows you to do something.'
|
||||
# authenticated: false
|
||||
# headers:
|
||||
# Content-Type: application/json
|
||||
# Accept: application/json
|
||||
# urlParameters:
|
||||
# param:
|
||||
# name: param
|
||||
# description: A URL param for no reason.
|
||||
# required: true
|
||||
# example: 2
|
||||
# type: integer
|
||||
# queryParameters:
|
||||
# speed:
|
||||
# name: speed
|
||||
# description: How fast the thing should be done. Can be `slow` or `fast`.
|
||||
# required: false
|
||||
# example: fast
|
||||
# type: string
|
||||
# bodyParameters:
|
||||
# something:
|
||||
# name: something
|
||||
# description: The things we should do.
|
||||
# required: true
|
||||
# example:
|
||||
# - string 1
|
||||
# - string 2
|
||||
# type: 'string[]'
|
||||
# responses:
|
||||
# - status: 200
|
||||
# description: 'When the thing was done smoothly.'
|
||||
# content: # Your response content can be an object, an array, a string or empty.
|
||||
# {
|
||||
# "hey": "ho ho ho"
|
||||
# }
|
||||
# responseFields:
|
||||
# hey:
|
||||
# name: hey
|
||||
# description: Who knows?
|
||||
# type: string # This is optional
|
||||
11
.scribe/intro.md
Normal file
11
.scribe/intro.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Introduction
|
||||
|
||||
This documentation aims to provide the information you need to work with the Snipe-IT JSON REST API.
|
||||
|
||||
<aside>
|
||||
<strong>Base URL</strong>: <code>https://snipe-it.test/api/v1</code>
|
||||
</aside>
|
||||
|
||||
<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
|
||||
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Actionlog;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class RemoveInvalidUploadDeleteActionLogItems extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'snipeit:remove-invalid-upload-delete-action-log-items';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Permanently remove invalid "upload deleted" action log items that have a null filename. This command can potentially result in deleted files being "resurrected" in the UI.';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$invalidLogs = Actionlog::query()
|
||||
->where('action_type', 'upload deleted')
|
||||
->whereNull('filename')
|
||||
->withTrashed()
|
||||
->get();
|
||||
|
||||
$this->info("{$invalidLogs->count()} invalid log items found.");
|
||||
|
||||
if ($invalidLogs->count() === 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$this->table(['ID', 'Action Type', 'Item Type', 'Item ID', 'Created At', 'Deleted At'], $invalidLogs->map(fn($log) => [
|
||||
$log->id,
|
||||
$log->action_type,
|
||||
$log->item_type,
|
||||
$log->item_id,
|
||||
$log->created_at,
|
||||
$log->deleted_at,
|
||||
])->toArray());
|
||||
|
||||
if ($this->confirm("Do you wish to remove {$invalidLogs->count()} log items?")) {
|
||||
$invalidLogs->each(fn($log) => $log->forceDelete());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
use ZipArchive;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use enshrined\svgSanitize\Sanitizer;
|
||||
|
||||
class SQLStreamer {
|
||||
private $input;
|
||||
@@ -242,9 +243,10 @@ class RestoreFromBackup extends Command
|
||||
|
||||
$private_dirs = [
|
||||
'storage/private_uploads/accessories',
|
||||
'storage/private_uploads/assetmodels',
|
||||
'storage/private_uploads/maintenances',
|
||||
'storage/private_uploads/models',
|
||||
'storage/private_uploads/assetmodels' => 'storage/private_uploads/models', //this was changed from assetmodels => models Aug 10 2025
|
||||
'storage/private_uploads/asset_maintenances' => 'storage/private_uploads/maintenances', //this was changed from asset_maintenances => maintenances Aug 10 2025
|
||||
'storage/private_uploads/maintenances', //but let 'maintenances' take precedence
|
||||
'storage/private_uploads/models', //and let 'models' take precedence
|
||||
'storage/private_uploads/assets', // these are asset _files_, not the pictures.
|
||||
'storage/private_uploads/audits',
|
||||
'storage/private_uploads/components',
|
||||
@@ -262,7 +264,7 @@ class RestoreFromBackup extends Command
|
||||
];
|
||||
$public_dirs = [
|
||||
'public/uploads/accessories',
|
||||
'public/uploads/assetmodels',
|
||||
// 'public/uploads/assetmodels' => 'public/uploads/models', //according to git, this was _never_ a thing... (see below)
|
||||
'public/uploads/maintenances',
|
||||
'public/uploads/assets', // these are asset _pictures_, not asset files
|
||||
'public/uploads/avatars',
|
||||
@@ -273,7 +275,7 @@ class RestoreFromBackup extends Command
|
||||
'public/uploads/departments',
|
||||
'public/uploads/locations',
|
||||
'public/uploads/manufacturers',
|
||||
'public/uploads/models',
|
||||
'public/uploads/models', // ...it's been this way for 9 years (as of late 2025)
|
||||
'public/uploads/suppliers',
|
||||
];
|
||||
|
||||
@@ -286,8 +288,6 @@ class RestoreFromBackup extends Command
|
||||
'public/uploads/favicon-uploaded.*',
|
||||
];
|
||||
|
||||
$all_files = $private_dirs + $public_dirs;
|
||||
|
||||
$sqlfiles = [];
|
||||
$sqlfile_indices = [];
|
||||
|
||||
@@ -295,6 +295,20 @@ class RestoreFromBackup extends Command
|
||||
$boring_files = [];
|
||||
$unsafe_files = [];
|
||||
|
||||
$good_extensions = config('filesystems.allowed_upload_extensions_array');
|
||||
|
||||
$private_extensions = array_merge($good_extensions, ["csv", "key"]); //add csv, and 'key'
|
||||
$public_extensions = array_diff($good_extensions, ["xml"]); //remove xml
|
||||
|
||||
$sanitizer = new Sanitizer();
|
||||
|
||||
/**
|
||||
* TODO: I _hate_ the "continue 3" thing we keep doing here
|
||||
* I think a better approach might be to have the "each file" stuff be in a method on this class, and the
|
||||
* boring_files and interesting_files be properties on it that we fill out. Then, in that method, we could
|
||||
* just do a 'return' once the file is actually handled (yay or nay). We could also start to break out some of
|
||||
* the _other_ things that we do into their own methods too? But I don't care about that as much.
|
||||
*/
|
||||
for ($i = 0; $i < $za->numFiles; $i++) {
|
||||
$stat_results = $za->statIndex($i);
|
||||
// echo "index: $i\n";
|
||||
@@ -309,7 +323,7 @@ class RestoreFromBackup extends Command
|
||||
// skip macOS resource fork files (?!?!?!)
|
||||
if (strpos($raw_path, '__MACOSX') !== false && strpos($raw_path, '._') !== false) {
|
||||
//print "SKIPPING macOS Resource fork file: $raw_path\n";
|
||||
$boring_files[] = $raw_path;
|
||||
// $boring_files[] = $raw_path; //stop adding this to the boring files list; it's just confusing
|
||||
continue;
|
||||
}
|
||||
if (@pathinfo($raw_path, PATHINFO_EXTENSION) == 'sql') {
|
||||
@@ -318,44 +332,70 @@ class RestoreFromBackup extends Command
|
||||
$sqlfile_indices[] = $i;
|
||||
continue;
|
||||
}
|
||||
if ($raw_path[-1] == '/') {
|
||||
//last character is '/' - this is a directory, and we don't need it, and we don't need to warn about it
|
||||
continue;
|
||||
}
|
||||
if (in_array(basename($raw_path), [".gitkeep", ".gitignore", ".DS_Store"])) {
|
||||
//skip these boring files silently without reporting on them; they're stupid
|
||||
continue;
|
||||
}
|
||||
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
|
||||
|
||||
foreach (array_merge($private_dirs, $public_dirs) as $dir) {
|
||||
foreach (['public' => $public_dirs, 'private' => $private_dirs] as $purpose => $dirs) {
|
||||
$allowed_extensions = match ($purpose) {
|
||||
'public' => $public_extensions,
|
||||
'private' => $private_extensions,
|
||||
};
|
||||
foreach ($dirs as $dir => $destdir) {
|
||||
if (is_int($dir)) {
|
||||
$dir = $destdir;
|
||||
}
|
||||
$last_pos = strrpos($raw_path, $dir . '/');
|
||||
if ($last_pos !== false) {
|
||||
//print("INTERESTING - last_pos is $last_pos when searching $raw_path for $dir - last_pos+strlen(\$dir) is: ".($last_pos+strlen($dir))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
|
||||
//print("We would copy $raw_path to $dir.\n"); //FIXME append to a path?
|
||||
$interesting_files[$raw_path] = ['dest' => $dir, 'index' => $i];
|
||||
continue 2;
|
||||
if ($last_pos + strlen($dir) + 1 == strlen($raw_path)) {
|
||||
// we don't care about that; we just want files with the appropriate prefix
|
||||
//print("FOUND THE EXACT DIRECTORY: $dir AT: $raw_path!!!\n");
|
||||
//the CSV bit, below, is because we store CSV files as "blahcsv" - without an extension
|
||||
if (!in_array($extension, $allowed_extensions) && !($dir == "storage/private_uploads/imports" && substr($raw_path, -3) == "csv" && $extension == "")) {
|
||||
$unsafe_files[] = $raw_path;
|
||||
Log::debug($raw_path . ' from directory ' . $dir . ' is being skipped');
|
||||
} else {
|
||||
if ($dir != $destdir) {
|
||||
Log::debug("Getting ready to save file $raw_path to new directory $destdir");
|
||||
}
|
||||
$interesting_files[$raw_path] = ['dest' => $destdir, 'index' => $i];
|
||||
}
|
||||
continue 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$good_extensions = config('filesystems.allowed_upload_extensions_array');
|
||||
|
||||
foreach (array_merge($private_files, $public_files) as $file) {
|
||||
foreach (['public' => $public_files, 'private' => $private_files] as $purpose => $files) {
|
||||
$allowed_extensions = match ($purpose) {
|
||||
'public' => $public_extensions,
|
||||
'private' => $private_extensions,
|
||||
};
|
||||
foreach ($files as $file) {
|
||||
$has_wildcard = (strpos($file, '*') !== false);
|
||||
if ($has_wildcard) {
|
||||
$file = substr($file, 0, -1); //trim last character (which should be the wildcard)
|
||||
}
|
||||
$last_pos = strrpos($raw_path, $file); // no trailing slash!
|
||||
if ($last_pos !== false) {
|
||||
$extension = strtolower(pathinfo($raw_path, PATHINFO_EXTENSION));
|
||||
if (!in_array($extension, $good_extensions)) {
|
||||
if (!in_array($extension, $allowed_extensions)) {
|
||||
// gathering potentially unsafe files here to return at exit
|
||||
$unsafe_files[] = $raw_path;
|
||||
Log::debug('Potentially unsafe file '.$raw_path.' is being skipped');
|
||||
Log::debug('Potentially unsafe file ' . $raw_path . ' is being skipped');
|
||||
$boring_files[] = $raw_path;
|
||||
continue 2;
|
||||
continue 3;
|
||||
}
|
||||
//print("INTERESTING - last_pos is $last_pos when searching $raw_path for $file - last_pos+strlen(\$file) is: ".($last_pos+strlen($file))." and strlen(\$rawpath) is: ".strlen($raw_path)."\n");
|
||||
//no wildcards found in $file, process 'normally'
|
||||
if ($last_pos + strlen($file) == strlen($raw_path) || $has_wildcard) { //again, no trailing slash. or this is a wildcard and we just take it.
|
||||
// print("FOUND THE EXACT FILE: $file AT: $raw_path!!!\n"); //we *do* care about this, though.
|
||||
$interesting_files[$raw_path] = ['dest' => dirname($file), 'index' => $i];
|
||||
continue 2;
|
||||
continue 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -492,18 +532,25 @@ class RestoreFromBackup extends Command
|
||||
}
|
||||
foreach ($interesting_files as $pretty_file_name => $file_details) {
|
||||
$ugly_file_name = $za->statIndex($file_details['index'])['name'];
|
||||
$migrated_file_name = $file_details['dest'] . '/' . basename($pretty_file_name);
|
||||
if (strcasecmp(substr($pretty_file_name, -4), ".svg") === 0) {
|
||||
$svg_contents = $za->getFromIndex($file_details['index']);
|
||||
$cleaned_svg = $sanitizer->sanitize($svg_contents);
|
||||
file_put_contents($migrated_file_name, $cleaned_svg);
|
||||
} else {
|
||||
$fp = $za->getStream($ugly_file_name);
|
||||
//$this->info("Weird problem, here are file details? ".print_r($file_details,true));
|
||||
if (!is_dir($file_details['dest'])) {
|
||||
mkdir($file_details['dest'], 0755, true); //0755 is what Laravel uses, so we do that
|
||||
}
|
||||
$migrated_file = fopen($file_details['dest'].'/'.basename($pretty_file_name), 'w');
|
||||
$migrated_file = fopen($migrated_file_name, 'w');
|
||||
while (($buffer = fgets($fp, SQLStreamer::$buffer_size)) !== false) {
|
||||
fwrite($migrated_file, $buffer);
|
||||
}
|
||||
fclose($migrated_file);
|
||||
fclose($fp);
|
||||
//$this->info("Wrote $ugly_file_name to $pretty_file_name");
|
||||
}
|
||||
if ($bar) {
|
||||
$bar->advance();
|
||||
}
|
||||
|
||||
@@ -56,27 +56,68 @@ class SendExpirationAlerts extends Command
|
||||
$assets = Asset::getExpiringWarrantyOrEol($alert_interval);
|
||||
|
||||
if ($assets->count() > 0) {
|
||||
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
|
||||
|
||||
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
|
||||
|
||||
$this->table(
|
||||
['ID', 'Tag', 'Model', 'Model Number', 'EOL', 'EOL Months', 'Warranty Expires', 'Warranty Months'],
|
||||
$assets->map(fn($item) => ['ID' => $item->id, 'Tag' => $item->asset_tag, 'Model' => $item->model->name, 'Model Number' => $item->model->model_number, 'EOL' => $item->asset_eol_date, 'EOL Months' => $item->model->eol, 'Warranty Expires' => $item->warranty_expires, 'Warranty Months' => $item->warranty_months])
|
||||
[
|
||||
trans('general.id'),
|
||||
trans('admin/hardware/form.tag'),
|
||||
trans('admin/hardware/form.model'),
|
||||
trans('general.model_no'),
|
||||
trans('general.purchase_date'),
|
||||
trans('admin/hardware/form.eol_rate'),
|
||||
trans('admin/hardware/form.eol_date'),
|
||||
trans('admin/hardware/form.warranty_expires'),
|
||||
],
|
||||
$assets->map(fn($item) =>
|
||||
[
|
||||
trans('general.id') => $item->id,
|
||||
trans('admin/hardware/form.tag') => $item->asset_tag,
|
||||
trans('admin/hardware/form.model') => $item->model->name,
|
||||
trans('general.model_no') => $item->model->model_number,
|
||||
trans('general.purchase_date') => $item->purchase_date_formatted,
|
||||
trans('admin/hardware/form.eol_rate') => $item->model->eol,
|
||||
trans('admin/hardware/form.eol_date') => $item->eol_date ? $item->eol_formatted_date .' ('.$item->eol_diff_for_humans.')' : '',
|
||||
trans('admin/hardware/form.warranty_expires') => $item->warranty_expires ? $item->warranty_expires_formatted_date .' ('.$item->warranty_expires_diff_for_humans.')' : '',
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
// Expiring licenses
|
||||
$licenses = License::getExpiringLicenses($alert_interval);
|
||||
$licenses = License::query()->ExpiringLicenses($alert_interval)
|
||||
->with('manufacturer','category')
|
||||
->orderBy('expiration_date', 'ASC')
|
||||
->orderBy('termination_date', 'ASC')
|
||||
->get();
|
||||
if ($licenses->count() > 0) {
|
||||
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
|
||||
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
|
||||
|
||||
$this->table(
|
||||
['ID', 'Name', 'Expires', 'Termination Date'],
|
||||
$licenses->map(fn($item) => ['ID' => $item->id, 'Name' => $item->name, 'Expires' => $item->expiration_date, 'Termination Date' => $item->termination_date])
|
||||
[
|
||||
trans('general.id'),
|
||||
trans('general.name'),
|
||||
trans('general.purchase_date'),
|
||||
trans('admin/licenses/form.expiration'),
|
||||
trans('mail.expires'),
|
||||
trans('admin/licenses/form.termination_date'),
|
||||
trans('mail.terminates')],
|
||||
$licenses->map(fn($item) => [
|
||||
trans('general.id') => $item->id,
|
||||
trans('general.name') => $item->name,
|
||||
trans('general.purchase_date') => $item->purchase_date_formatted,
|
||||
trans('admin/licenses/form.expiration') => $item->expires_formatted_date,
|
||||
trans('mail.expires') => $item->expires_diff_for_humans,
|
||||
trans('admin/licenses/form.termination_date') => $item->terminates_formatted_date,
|
||||
trans('mail.terminates') => $item->terminates_diff_for_humans
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
// Send a message even if the count is 0
|
||||
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
|
||||
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
@@ -47,7 +47,7 @@ class SendUpcomingAuditReport extends Command
|
||||
$today = Carbon::now();
|
||||
$interval_date = $today->copy()->addDays($interval);
|
||||
|
||||
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'desc')->get();
|
||||
$assets = Asset::whereNull('deleted_at')->dueOrOverdueForAudit($settings)->orderBy('assets.next_audit_date', 'asc')->get();
|
||||
$this->info($assets->count() . ' assets must be audited in on or before ' . $interval_date . ' is deadline');
|
||||
|
||||
|
||||
@@ -61,6 +61,28 @@ class SendUpcomingAuditReport extends Command
|
||||
|
||||
$this->info('Sending Admin SendUpcomingAuditNotification to: ' . $settings->alert_email);
|
||||
Mail::to($recipients)->send(new SendUpcomingAuditMail($assets, $settings->audit_warning_days));
|
||||
|
||||
$this->table(
|
||||
[
|
||||
trans('general.id'),
|
||||
trans('general.name'),
|
||||
trans('general.last_audit'),
|
||||
trans('general.next_audit_date'),
|
||||
trans('mail.Days'),
|
||||
trans('mail.supplier'),
|
||||
trans('mail.assigned_to'),
|
||||
|
||||
],
|
||||
$assets->map(fn($item) => [
|
||||
trans('general.id') => $item->id,
|
||||
trans('general.name') => $item->display_name,
|
||||
trans('general.last_audit') => $item->last_audit_formatted_date,
|
||||
trans('general.next_audit_date') => $item->next_audit_formatted_date,
|
||||
trans('mail.Days') => round($item->next_audit_diff_in_days),
|
||||
trans('mail.supplier') => $item->supplier ? $item->supplier->name : '',
|
||||
trans('mail.assigned_to') => $item->assignedTo ? $item->assignedTo->display_name : '',
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ class Handler extends ExceptionHandler
|
||||
|
||||
// Handle API requests that fail because Carbon cannot parse the date on validation (when a submitted date value is definitely not a date)
|
||||
if ($e instanceof InvalidFormatException) {
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.date', ['attribute' => 'date'])), 200);
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('validation.date', ['attribute' => 'date'])), config('app.validation_status_code'));
|
||||
}
|
||||
|
||||
// Handle API requests that fail because the model doesn't exist
|
||||
@@ -124,7 +124,7 @@ class Handler extends ExceptionHandler
|
||||
// never even get to the controller where we normally nicely format JSON responses
|
||||
if ($e instanceof ValidationException) {
|
||||
$response = $this->invalidJson($request, $e);
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $e->errors()), 200);
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $e->errors()), config('app.validation_status_code'));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class Handler extends ExceptionHandler
|
||||
|
||||
protected function invalidJson($request, ValidationException $exception)
|
||||
{
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors()), 200);
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $exception->errors()), config('app.validation_status_code'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ class Helper
|
||||
$Parsedown->setSafeMode(true);
|
||||
|
||||
if ($str) {
|
||||
return $Parsedown->text($str);
|
||||
return $Parsedown->text(strip_tags($str));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class Helper
|
||||
$Parsedown->setSafeMode(true);
|
||||
|
||||
if ($str) {
|
||||
return $Parsedown->line($str);
|
||||
return $Parsedown->line(strip_tags($str));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,6 @@ use App\Models\Company;
|
||||
use App\Models\Contracts\Acceptable;
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use App\Models\AssetModel;
|
||||
use App\Models\Accessory;
|
||||
use App\Models\License;
|
||||
use App\Models\Component;
|
||||
use App\Models\Consumable;
|
||||
use App\Notifications\AcceptanceAssetAcceptedNotification;
|
||||
use App\Notifications\AcceptanceAssetAcceptedToUserNotification;
|
||||
use App\Notifications\AcceptanceAssetDeclinedNotification;
|
||||
@@ -26,12 +21,9 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Http\Controllers\SettingsController;
|
||||
use Carbon\Carbon;
|
||||
use \Illuminate\Contracts\View\View;
|
||||
use \Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use TCPDF;
|
||||
use App\Helpers\Helper;
|
||||
|
||||
class AcceptanceController extends Controller
|
||||
@@ -83,6 +75,10 @@ class AcceptanceController extends Controller
|
||||
public function store(Request $request, $id) : RedirectResponse
|
||||
{
|
||||
$acceptance = CheckoutAcceptance::find($id);
|
||||
$assigned_user = User::find($acceptance->assigned_to_id);
|
||||
$settings = Setting::getSettings();
|
||||
$sig_filename='';
|
||||
|
||||
|
||||
if (is_null($acceptance)) {
|
||||
return redirect()->route('account.accept')->with('error', trans('admin/hardware/message.does_not_exist'));
|
||||
@@ -118,15 +114,11 @@ class AcceptanceController extends Controller
|
||||
Storage::makeDirectory('private_uploads/eula-pdfs', 775);
|
||||
}
|
||||
|
||||
|
||||
$item = $acceptance->checkoutable_type::find($acceptance->checkoutable_id);
|
||||
$display_model = '';
|
||||
$pdf_view_route = '';
|
||||
$pdf_filename = 'accepted-eula-'.date('Y-m-d-h-i-s').'.pdf';
|
||||
$sig_filename='';
|
||||
|
||||
if ($request->input('asset_acceptance') == 'accepted') {
|
||||
|
||||
|
||||
// If signatures are required, make sure we have one
|
||||
if (Setting::getSettings()->require_accept_signature == '1') {
|
||||
|
||||
// The item was accepted, check for a signature
|
||||
@@ -144,110 +136,49 @@ class AcceptanceController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
$assigned_user = User::find($acceptance->assigned_to_id);
|
||||
|
||||
|
||||
/**
|
||||
* Gather the data for the PDF. We fire this whether there is a signature required or not,
|
||||
* since we want the moment-in-time proof of what the EULA was when they accepted it.
|
||||
*/
|
||||
$branding_settings = SettingsController::getPDFBranding();
|
||||
|
||||
$path_logo = "";
|
||||
|
||||
// Check for the PDF logo path and use that, otherwise use the regular logo path
|
||||
if (!is_null($branding_settings->acceptance_pdf_logo)) {
|
||||
$path_logo = public_path() . '/uploads/' . $branding_settings->acceptance_pdf_logo;
|
||||
} elseif (!is_null($branding_settings->logo)) {
|
||||
$path_logo = public_path() . '/uploads/' . $branding_settings->logo;
|
||||
// Convert PDF logo to base64 for TCPDF
|
||||
// This is needed for TCPDF to properly embed the image if it's a png and the cache isn't writable
|
||||
$encoded_logo = null;
|
||||
if ($settings->acceptance_pdf_logo) {
|
||||
$encoded_logo = base64_encode(file_get_contents(public_path() . '/uploads/' . $settings->acceptance_pdf_logo));
|
||||
}
|
||||
|
||||
// Get the data array ready for the notifications and PDF generation
|
||||
$data = [
|
||||
'item_tag' => $item->asset_tag,
|
||||
'item_model' => $display_model,
|
||||
'item_name' => $item->name, // this handles licenses seats, which don't have a 'name' field
|
||||
'item_model' => $item->model?->name,
|
||||
'item_serial' => $item->serial,
|
||||
'item_status' => $item->assetstatus?->name,
|
||||
'eula' => $item->getEula(),
|
||||
'note' => $request->input('note'),
|
||||
'check_out_date' => Carbon::parse($acceptance->created_at)->format('Y-m-d H:i:s'),
|
||||
'accepted_date' => Carbon::parse($acceptance->accepted_at)->format('Y-m-d H:i:s'),
|
||||
'check_out_date' => Helper::getFormattedDateObject($acceptance->created_at, 'datetime', false),
|
||||
'accepted_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
|
||||
'declined_date' => Helper::getFormattedDateObject(now()->format('Y-m-d H:i:s'), 'datetime', false),
|
||||
'assigned_to' => $assigned_user->display_name,
|
||||
'company_name' => $branding_settings->site_name,
|
||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||
'logo' => $path_logo,
|
||||
'date_settings' => $branding_settings->date_display_format,
|
||||
'email' => $assigned_user->email,
|
||||
'employee_num' => $assigned_user->employee_num,
|
||||
'site_name' => $settings->site_name,
|
||||
'company_name' => $item->company?->name?? $settings->site_name,
|
||||
'signature' => (($sig_filename && array_key_exists('1', $encoded_image))) ? $encoded_image[1] : null,
|
||||
'logo' => ($encoded_logo) ?? null,
|
||||
'date_settings' => $settings->date_display_format,
|
||||
'admin' => auth()->user()->present()?->fullName,
|
||||
'qty' => $acceptance->qty ?? 1,
|
||||
];
|
||||
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'UTF-8';
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
|
||||
$pdf->setRTL(false);
|
||||
$pdf->setLanguageArray($lg);
|
||||
$pdf->SetFontSubsetting(true);
|
||||
$pdf->SetCreator('Snipe-IT');
|
||||
$pdf->SetAuthor($data['assigned_to']);
|
||||
$pdf->SetTitle('Asset Acceptance: '.$data['item_tag']);
|
||||
$pdf->SetSubject('Asset Acceptance: '.$data['item_tag']);
|
||||
$pdf->SetKeywords('Snipe-IT, assets, acceptance, eula', 'tos');
|
||||
$pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
$pdf->SetPrintHeader(false);
|
||||
$pdf->SetPrintFooter(false);
|
||||
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
|
||||
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
|
||||
|
||||
$pdf->AddPage();
|
||||
$pdf->writeHTML('<img src="'.$path_logo.'" height="30">', true, 0, true, 0, '');
|
||||
|
||||
if ($data['item_serial']) {
|
||||
$pdf->writeHTML("<strong>" . trans('general.asset_tag') . '</strong>: ' . $data['item_tag'], true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->writeHTML("<strong>".trans('general.asset_model').'</strong>: '.$data['item_model'], true, 0, true, 0, '');
|
||||
if ($data['item_serial']) {
|
||||
$pdf->writeHTML("<strong>".trans('admin/hardware/form.serial').'</strong>: '.$data['item_serial'], true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->writeHTML("<strong>".trans('general.assigned_date').'</strong>: '.$data['check_out_date'], true, 0, true, 0, '');
|
||||
$pdf->writeHTML("<strong>".trans('general.assignee').'</strong>: '.$data['assigned_to'], true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
|
||||
// Break the EULA into lines based on newlines, and check each line for RTL or CJK characters
|
||||
$eula_lines = preg_split("/\r\n|\n|\r/", $item->getEula());
|
||||
|
||||
foreach ($eula_lines as $eula_line) {
|
||||
Helper::hasRtl($eula_line) ? $pdf->setRTL(true) : $pdf->setRTL(false);
|
||||
Helper::isCjk($eula_line) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
|
||||
$pdf->writeHTML(Helper::parseEscapedMarkedown($eula_line), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->setRTL(false);
|
||||
$pdf->writeHTML('<br><br>', true, 0, true, 0, '');
|
||||
|
||||
if ($data['note'] != null) {
|
||||
Helper::isCjk($data['note']) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
$pdf->writeHTML("<strong>".trans('general.notes') . '</strong>: ' . $data['note'], true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
if ($data['signature'] != null) {
|
||||
|
||||
$pdf->writeHTML('<img src="'.$data['signature'].'" style="max-width: 600px;">', true, 0, true, 0, '');
|
||||
$pdf->writeHTML('<hr>', true, 0, true, 0, '');
|
||||
}
|
||||
|
||||
$pdf->writeHTML("<strong>".trans('general.accepted_date').'</strong>: '.$data['accepted_date'], true, 0, true, 0, '');
|
||||
if ($request->input('asset_acceptance') == 'accepted') {
|
||||
|
||||
|
||||
$pdf_content = $pdf->Output($pdf_filename, 'S');
|
||||
$pdf_filename = 'accepted-'.$acceptance->checkoutable_id.'-'.$acceptance->display_checkoutable_type.'-eula-'.date('Y-m-d-h-i-s').'.pdf';
|
||||
|
||||
// Generate the PDF content
|
||||
$pdf_content = $acceptance->generateAcceptancePdf($data, $acceptance);
|
||||
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf_content);
|
||||
|
||||
|
||||
// Log the acceptance
|
||||
$acceptance->accept($sig_filename, $item->getEula(), $pdf_filename, $request->input('note'));
|
||||
|
||||
// Send the PDF to the signing user
|
||||
@@ -270,45 +201,9 @@ class AcceptanceController extends Controller
|
||||
|
||||
$return_msg = trans('admin/users/message.accepted');
|
||||
|
||||
// Item was not accepted
|
||||
// Item was declined
|
||||
} else {
|
||||
|
||||
if (Setting::getSettings()->require_accept_signature == '1') {
|
||||
|
||||
// The item was declined, check for a signature
|
||||
if ($request->filled('signature_output')) {
|
||||
$sig_filename = 'siglog-' . Str::uuid() . '-' . date('Y-m-d-his') . '.png';
|
||||
$data_uri = $request->input('signature_output');
|
||||
$encoded_image = explode(',', $data_uri);
|
||||
$decoded_image = base64_decode($encoded_image[1]);
|
||||
Storage::put('private_uploads/signatures/' . $sig_filename, (string)$decoded_image);
|
||||
|
||||
// No image data is present, kick them back.
|
||||
// This mostly only applies to users on super-duper crapola browsers *cough* IE *cough*
|
||||
} else {
|
||||
return redirect()->back()->with('error', trans('general.shitty_browser'));
|
||||
}
|
||||
}
|
||||
|
||||
// Format the data to send the declined notification
|
||||
$branding_settings = SettingsController::getPDFBranding();
|
||||
$assigned_to = User::find($acceptance->assigned_to_id)->present()->fullName;
|
||||
|
||||
$data = [
|
||||
'item_tag' => $item->asset_tag,
|
||||
'item_model' => $item->model ? $item->model->name : $item->display_name,
|
||||
'item_serial' => $item->serial,
|
||||
'item_status' => $item->assetstatus?->name,
|
||||
'note' => $request->input('note'),
|
||||
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
|
||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||
'assigned_to' => $assigned_to,
|
||||
'company_name' => $branding_settings->site_name,
|
||||
'date_settings' => $branding_settings->date_display_format,
|
||||
'qty' => $acceptance->qty ?? 1,
|
||||
];
|
||||
|
||||
|
||||
for ($i = 0; $i < ($acceptance->qty ?? 1); $i++) {
|
||||
$acceptance->decline($sig_filename, $request->input('note'));
|
||||
}
|
||||
@@ -319,6 +214,8 @@ class AcceptanceController extends Controller
|
||||
$return_msg = trans('admin/users/message.declined');
|
||||
}
|
||||
|
||||
|
||||
// Send an email notification if one is requested
|
||||
if ($acceptance->alert_on_response_id) {
|
||||
try {
|
||||
$recipient = User::find($acceptance->alert_on_response_id);
|
||||
@@ -337,9 +234,10 @@ class AcceptanceController extends Controller
|
||||
Log::warning($e);
|
||||
}
|
||||
}
|
||||
|
||||
return redirect()->to('account/accept')->with('success', $return_msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Actionlog;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use \Illuminate\Http\Response;
|
||||
use Symfony\Component\HttpFoundation\BinaryFileResponse;
|
||||
use \Illuminate\Http\Response;
|
||||
|
||||
class ActionlogController extends Controller
|
||||
{
|
||||
public function displaySig($filename) : RedirectResponse | Response | bool
|
||||
@@ -39,17 +41,29 @@ class ActionlogController extends Controller
|
||||
|
||||
public function getStoredEula($filename) : Response | BinaryFileResponse | RedirectResponse
|
||||
{
|
||||
$this->authorize('view', \App\Models\Asset::class);
|
||||
|
||||
if ($actionlog = Actionlog::where('filename', $filename)->with('user')->with('target')->firstOrFail()) {
|
||||
|
||||
$this->authorize('view', $actionlog->target);
|
||||
$this->authorize('view', $actionlog->user);
|
||||
|
||||
|
||||
if (config('filesystems.default') == 's3_private') {
|
||||
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/'.$filename, now()->addMinutes(5)));
|
||||
return redirect()->away(Storage::disk('s3_private')->temporaryUrl('private_uploads/eula-pdfs/' . $filename, now()->addMinutes(5)));
|
||||
}
|
||||
|
||||
if (Storage::exists('private_uploads/eula-pdfs/'.$filename)) {
|
||||
return response()->download(config('app.private_uploads').'/eula-pdfs/'.$filename);
|
||||
if (Storage::exists('private_uploads/eula-pdfs/' . $filename)) {
|
||||
|
||||
if (request()->input('inline') == 'true') {
|
||||
return response()->file(config('app.private_uploads') . '/eula-pdfs/' . $filename);
|
||||
}
|
||||
|
||||
return response()->download(config('app.private_uploads') . '/eula-pdfs/' . $filename);
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.file_does_not_exist'));
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.record_not_found'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,12 +11,9 @@ use App\Http\Requests\StoreAccessoryRequest;
|
||||
use App\Http\Transformers\AccessoriesTransformer;
|
||||
use App\Http\Transformers\SelectlistTransformer;
|
||||
use App\Models\Accessory;
|
||||
use App\Models\Company;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Requests\ImageUploadRequest;
|
||||
use App\Models\AccessoryCheckout;
|
||||
@@ -26,11 +23,25 @@ class AccessoriesController extends Controller
|
||||
use CheckInOutRequest;
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List accessories
|
||||
*
|
||||
* @group Accessories
|
||||
* @queryParam search string A search term to filter results by. Example: keyboard
|
||||
* @queryParam filter[<fieldname>] string A field to filter by. Example
|
||||
* @queryParam company_id int Filter by company ID. Example: 1
|
||||
* @queryParam category_id int Filter by category ID. Example: 1
|
||||
* @queryParam manufacturer_id int Filter by manufacturer ID. Example: 1
|
||||
* @queryParam supplier_id int Filter by supplier ID. Example: 1
|
||||
* @queryParam location_id int Filter by location ID. Example: 1
|
||||
* @queryParam notes string Filter by notes. Example: For office use only
|
||||
* @queryParam offset int The number of items to skip before starting to collect the result set. Example: 0
|
||||
* @queryParam limit int The number of items to return. Example: 50
|
||||
* @queryParam sort string The field to sort by. Example: created_at
|
||||
* @queryParam order string The order to sort by. Example: desc
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
@@ -54,6 +65,15 @@ class AccessoriesController extends Controller
|
||||
'notes',
|
||||
'checkouts_count',
|
||||
'qty',
|
||||
// These are *relationships* so we wouldn't normally include them in this array,
|
||||
// since they would normally create a `column not found` error,
|
||||
// BUT we account for them in the ordering switch down at the end of this method
|
||||
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
|
||||
'company',
|
||||
'location',
|
||||
'category',
|
||||
'supplier',
|
||||
'manufacturer',
|
||||
];
|
||||
|
||||
|
||||
@@ -61,10 +81,23 @@ class AccessoriesController extends Controller
|
||||
->with('category', 'company', 'manufacturer', 'checkouts', 'location', 'supplier', 'adminuser')
|
||||
->withCount('checkouts as checkouts_count');
|
||||
|
||||
if ($request->filled('search')) {
|
||||
$accessories = $accessories->TextSearch($request->input('search'));
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
if ((! is_null($filter)) && (count($filter)) > 0) {
|
||||
$accessories->ByFilter($filter);
|
||||
} elseif ($request->filled('search')) {
|
||||
$accessories->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
if ($request->filled('company_id')) {
|
||||
$accessories->where('accessories.company_id', '=', $request->input('company_id'));
|
||||
}
|
||||
@@ -129,9 +162,13 @@ class AccessoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Accessory
|
||||
*
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
* @group Accessories
|
||||
* @bodyParam name string required The name of the accessory. Example: Apple Bluetooth Keyboard
|
||||
* @bodyParam qty int required The number of accessories to create. Example: 10
|
||||
* @bodyParam category_id int required The ID of the category to assign this accessory to. Example: 1
|
||||
* @bodyParam image file No-example
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
@@ -151,8 +188,9 @@ class AccessoriesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Accessory
|
||||
*
|
||||
* @group Accessories
|
||||
* @param int $id
|
||||
* @return array
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
@@ -167,26 +205,11 @@ class AccessoriesController extends Controller
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return array
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
public function accessory_detail($id)
|
||||
{
|
||||
$this->authorize('view', Accessory::class);
|
||||
$accessory = Accessory::findOrFail($id);
|
||||
|
||||
return (new AccessoriesTransformer)->transformAccessory($accessory);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the list of checkouts for a specific accessory
|
||||
* Show Accessory Checkouts
|
||||
*
|
||||
* @group Accessories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -216,8 +239,9 @@ class AccessoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update accessory.
|
||||
*
|
||||
* @group Accessories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -239,8 +263,9 @@ class AccessoriesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Accessory
|
||||
*
|
||||
* @group Accessories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -263,11 +288,12 @@ class AccessoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Save the Accessory checkout information.
|
||||
* Checkout Accessory
|
||||
*
|
||||
* If Slack is enabled and/or asset acceptance is enabled, it will also
|
||||
* trigger a Slack message and send an email.
|
||||
*
|
||||
* @group Accessories
|
||||
* @param int $accessoryId
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
@@ -310,8 +336,9 @@ class AccessoriesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Check in the item so that it can be checked out again to someone else
|
||||
* Checkin Accessory
|
||||
*
|
||||
* @group Accessories
|
||||
* @param Request $request
|
||||
* @param int $accessoryUserId
|
||||
* @param string $backto
|
||||
@@ -353,8 +380,10 @@ class AccessoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Accessories
|
||||
* @queryParam search string A search term to filter results by name. No-example
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -25,8 +25,9 @@ use Illuminate\Http\JsonResponse;
|
||||
class AssetModelsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Models
|
||||
*
|
||||
* @group Models
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -46,11 +47,20 @@ class AssetModelsController extends Controller
|
||||
'manufacturer',
|
||||
'requestable',
|
||||
'assets_count',
|
||||
'assets_assigned_count',
|
||||
'assets_archived_count',
|
||||
'remaining',
|
||||
'category',
|
||||
'fieldset',
|
||||
'deleted_at',
|
||||
'updated_at',
|
||||
'require_serial',
|
||||
// These are *relationships* so we wouldn't normally include them in this array,
|
||||
// since they would normally create a `column not found` error,
|
||||
// BUT we account for them in the ordering switch down at the end of this method
|
||||
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
|
||||
'manufacturer',
|
||||
'category',
|
||||
];
|
||||
|
||||
$assetmodels = AssetModel::select([
|
||||
@@ -73,7 +83,28 @@ class AssetModelsController extends Controller
|
||||
'models.require_serial'
|
||||
])
|
||||
->with('category', 'depreciation', 'manufacturer', 'fieldset.fields.defaultValues', 'adminuser')
|
||||
->withCount('assets as assets_count');
|
||||
->withCount('assets as assets_count')
|
||||
->withCount('availableAssets as remaining')
|
||||
->withCount('assignedAssets as assets_assigned_count')
|
||||
->withCount('archivedAssets as assets_archived_count');
|
||||
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
if ((! is_null($filter)) && (count($filter)) > 0) {
|
||||
$assetmodels->ByFilter($filter);
|
||||
} elseif ($request->filled('search')) {
|
||||
$assetmodels->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
if ($request->input('status')=='deleted') {
|
||||
$assetmodels->onlyTrashed();
|
||||
@@ -142,8 +173,9 @@ class AssetModelsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Model
|
||||
*
|
||||
* @group Models
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\StoreAssetModelRequest $request
|
||||
@@ -164,11 +196,12 @@ class AssetModelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Model
|
||||
*
|
||||
* @group Models
|
||||
* @urlParam id int required The ID of the model.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
*/
|
||||
public function show($id) : array
|
||||
{
|
||||
@@ -179,11 +212,13 @@ class AssetModelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource's assets
|
||||
* List Assets in Model
|
||||
*
|
||||
* @group Models
|
||||
* @urlParam id int required The ID of the model.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
*
|
||||
*/
|
||||
public function assets($id) : array
|
||||
{
|
||||
@@ -195,12 +230,12 @@ class AssetModelsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Model
|
||||
*
|
||||
* @group Models
|
||||
* @urlParam id int required The ID of the model.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(StoreAssetModelRequest $request, $id) : JsonResponse
|
||||
@@ -231,11 +266,12 @@ class AssetModelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Model
|
||||
*
|
||||
* @group Models
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
* @urlParam id int required The ID of the model.
|
||||
*/
|
||||
public function destroy($id) : JsonResponse
|
||||
{
|
||||
@@ -261,8 +297,9 @@ class AssetModelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist of Models
|
||||
*
|
||||
* @group Models
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Events\CheckoutableCheckedIn;
|
||||
use App\Http\Requests\StoreAssetRequest;
|
||||
use App\Http\Requests\UpdateAssetRequest;
|
||||
use App\Http\Traits\MigratesLegacyAssetLocations;
|
||||
use App\Http\Transformers\ComponentsTransformer;
|
||||
use App\Models\AccessoryCheckout;
|
||||
use App\Models\CheckoutAcceptance;
|
||||
use App\Models\LicenseSeat;
|
||||
@@ -49,10 +50,32 @@ class AssetsController extends Controller
|
||||
use MigratesLegacyAssetLocations;
|
||||
|
||||
/**
|
||||
* Returns JSON listing of all assets
|
||||
* List Assets
|
||||
*
|
||||
* @group Assets
|
||||
* @queryParam action string The action to filter by: audits, checkins. No-example
|
||||
* @queryParam upcoming_status string The status to filter by: `due`, `overdue`, `due-or-overdue`. No-example
|
||||
* @queryParam status string The asset status to filter by: `RTD`, `Deployed`, `Pending`, `Undeployable`, `Archived`, `Requestable`. No-example
|
||||
* @queryParam status_id int The asset status ID to filter by. No-example
|
||||
* @queryParam asset_tag string The asset tag to filter by. No-example
|
||||
* @queryParam serial string The serial number to filter by. No-example
|
||||
* @queryParam requestable boolean Filter by requestable assets. No-example
|
||||
* @queryParam model_id int The model ID or IDs to filter by. No-example
|
||||
* @queryParam category_id int The category ID to filter by. No-example
|
||||
* @queryParam location_id int The location ID to filter by. No-example
|
||||
* @queryParam rtd_location_id int The RTD location ID to filter by. No-example
|
||||
* @queryParam supplier_id int The supplier ID to filter by. No-example
|
||||
* @queryParam asset_eol_date date The asset end-of-life date to filter by. No-example
|
||||
* @queryParam assigned_to int The user ID or department ID the asset is assigned to. No-example
|
||||
* @queryParam assigned_type string The type of assignment, either 'user' or 'asset' or 'location'. Example: user
|
||||
* @queryParam company_id int The company ID to filter by. No-example
|
||||
* @queryParam manufacturer_id int The manufacturer ID to filter by. No-example
|
||||
* @queryParam depreciation_id int The depreciation ID to filter by. No-example
|
||||
* @queryParam byod boolean Filter by BYOD assets. Example: true
|
||||
* @queryParam order_number string The order number to filter by. Example: No-example
|
||||
* @queryParam search string A text string to search for. Example: No-example
|
||||
* @queryParam filter string A JSON object of key/value pairs to filter by. No-example
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
* @since [v4.0]
|
||||
*/
|
||||
public function index(Request $request, $action = null, $upcoming_status = null) : JsonResponse | array
|
||||
@@ -115,6 +138,22 @@ class AssetsController extends Controller
|
||||
'asset_eol_date',
|
||||
'requestable',
|
||||
'jobtitle',
|
||||
// These are *relationships* so we wouldn't normally include them in this array,
|
||||
// since they would normally create a `column not found` error,
|
||||
// BUT we account for them in the ordering switch down at the end of this method
|
||||
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
|
||||
'company',
|
||||
'model',
|
||||
'location',
|
||||
'rtd_location',
|
||||
'category',
|
||||
'status_label',
|
||||
'manufacturer',
|
||||
'supplier',
|
||||
'jobtitle',
|
||||
'assigned_to',
|
||||
'created_by',
|
||||
|
||||
];
|
||||
|
||||
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
||||
@@ -131,6 +170,7 @@ class AssetsController extends Controller
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
$assets = Asset::select('assets.*')
|
||||
@@ -457,9 +497,10 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Returns JSON with information about an asset (by tag) for detail view.
|
||||
* Lookup by Tag
|
||||
*
|
||||
* @param string $tag
|
||||
* @group Assets
|
||||
* @urlParam $tag string required The asset tag. Example: 1
|
||||
* @since [v4.2.1]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
@@ -492,10 +533,11 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON with information about an asset (by serial) for detail view.
|
||||
* Lookup by Serial
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param string $serial
|
||||
* @urlParam $serial string
|
||||
* @since [v4.2.1]
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
@@ -535,10 +577,11 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON with information about an asset for detail view.
|
||||
* Show Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
* @queryParam $assetId int required The asset ID. Example: 1
|
||||
* @since [v4.0]
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
@@ -555,6 +598,13 @@ class AssetsController extends Controller
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/hardware/message.does_not_exist')), 200);
|
||||
}
|
||||
|
||||
/**
|
||||
* Licenses Assigned to Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @queryParam $assetId int required The asset ID. Example: 1
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function licenses(Request $request, $id): array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
@@ -567,8 +617,12 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Assets
|
||||
* @queryParam $search string String to search on. No-example
|
||||
* @queryParam $companyId int Company ID to filter by. No-example
|
||||
* @queryParam $assetStatusType string The asset status type to filter by: `RTD`. No-example
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
@@ -626,8 +680,9 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Accepts a POST request to create a new asset
|
||||
* Create Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
* @since [v4.0]
|
||||
@@ -721,8 +776,15 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Accepts a POST request to update an asset
|
||||
* Update Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @queryParam model_id int The model ID to associate the asset with. Example: 1
|
||||
* @queryParam company_id int The company ID to associate the asset with. Example: 1
|
||||
* @queryParam rtd_location_id int The RTD location ID to associate the asset with. Example: 1
|
||||
* @queryParam last_audit_date date The last audit date for the asset. Example: 2023-12-31
|
||||
* @queryParam image file The image file to upload for the asset. Example: (binary)
|
||||
* @param \App\Http\Requests\UpdateAssetRequest $request
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -813,8 +875,10 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Delete a given asset (mark as deleted).
|
||||
* Delete Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @param int $id
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
* @since [v4.0]
|
||||
@@ -848,8 +912,9 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Restore a soft-deleted asset.
|
||||
* Restore Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
* @since [v5.1.18]
|
||||
@@ -876,8 +941,9 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Checkout an asset by its tag.
|
||||
* Checkout by Asset Tag
|
||||
*
|
||||
* @group Assets
|
||||
* @author [N. Butler]
|
||||
* @param string $tag
|
||||
* @since [v6.0.5]
|
||||
@@ -891,8 +957,9 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Checkout an asset
|
||||
* Checkout Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
* @since [v4.0]
|
||||
@@ -966,8 +1033,9 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Checkin an asset
|
||||
* Checkin Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $assetId
|
||||
* @since [v4.0]
|
||||
@@ -1051,8 +1119,9 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Checkin an asset by asset tag
|
||||
* Checkin by Asset Tag
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Janes] [<ajanes@adagiohealth.org>]
|
||||
* @since [v6.0]
|
||||
*/
|
||||
@@ -1075,8 +1144,9 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Mark an asset as audited
|
||||
* Audit Asset
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
* @since [v4.0]
|
||||
@@ -1200,8 +1270,9 @@ class AssetsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Returns JSON listing of all requestable assets
|
||||
* Show Requestable Assets
|
||||
*
|
||||
* @group Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -1288,6 +1359,11 @@ class AssetsController extends Controller
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* List Assets Assigned to Asset
|
||||
*
|
||||
* @group Assets
|
||||
*/
|
||||
public function assignedAssets(Request $request, Asset $asset) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
@@ -1305,6 +1381,11 @@ class AssetsController extends Controller
|
||||
return (new AssetsTransformer)->transformAssets($assets, $total);
|
||||
}
|
||||
|
||||
/**
|
||||
* List Accessories Assigned to Asset
|
||||
*
|
||||
* @group Assets
|
||||
*/
|
||||
public function assignedAccessories(Request $request, Asset $asset) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
@@ -1322,12 +1403,29 @@ class AssetsController extends Controller
|
||||
return (new AssetsTransformer)->transformCheckedoutAccessories($accessory_checkouts, $total);
|
||||
}
|
||||
|
||||
/**
|
||||
* List Components Assigned to Asset
|
||||
*
|
||||
* @group Assets
|
||||
*/
|
||||
public function assignedComponents(Request $request, Asset $asset): JsonResponse|array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
$this->authorize('view', $asset);
|
||||
|
||||
$asset->loadCount('components');
|
||||
$total = $asset->components_count;
|
||||
|
||||
$components = $asset->load(['components' => fn($query) => $query->applyOffsetAndLimit($total)])->components;
|
||||
|
||||
return (new ComponentsTransformer)->transformComponents($components, $total);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate asset labels by tag
|
||||
* Generate Label by Asset Tag
|
||||
*
|
||||
* @group Assets
|
||||
* @author [Nebelkreis] [https://github.com/NebelKreis]
|
||||
*
|
||||
* @param Request $request Contains asset_tags array of asset tags to generate labels for
|
||||
* @return JsonResponse Returns base64 encoded PDF on success, error message on failure
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,9 @@ use Illuminate\Support\Facades\Storage;
|
||||
class CategoriesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Categories
|
||||
*
|
||||
* @group Categories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
@@ -61,6 +62,23 @@ class CategoriesController extends Controller
|
||||
->withCount('accessories as accessories_count', 'consumables as consumables_count', 'components as components_count', 'licenses as licenses_count', 'models as models_count');
|
||||
|
||||
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
if ((! is_null($filter)) && (count($filter)) > 0) {
|
||||
$categories->ByFilter($filter);
|
||||
} elseif ($request->filled('search')) {
|
||||
$categories->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
/*
|
||||
* This checks to see if we should override the Admin Setting to show archived assets in list.
|
||||
* We don't currently use it within the Snipe-IT GUI, but will be useful for API integrations where they
|
||||
@@ -74,10 +92,6 @@ class CategoriesController extends Controller
|
||||
$categories = $categories->withCount('showableAssets as assets_count');
|
||||
}
|
||||
|
||||
if ($request->filled('search')) {
|
||||
$categories = $categories->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
if ($request->filled('name')) {
|
||||
$categories->where('name', '=', $request->input('name'));
|
||||
}
|
||||
@@ -135,8 +149,9 @@ class CategoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Category
|
||||
*
|
||||
* @group Categories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -158,8 +173,9 @@ class CategoriesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Category
|
||||
*
|
||||
* @group Categories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -174,8 +190,9 @@ class CategoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Category
|
||||
*
|
||||
* @group Categories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -204,8 +221,9 @@ class CategoriesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Category
|
||||
*
|
||||
* @group Categories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -228,8 +246,9 @@ class CategoriesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Categories
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -14,6 +14,11 @@ use Exception;
|
||||
|
||||
class CheckoutRequest extends Controller
|
||||
{
|
||||
/**
|
||||
* Store Asset Request
|
||||
*
|
||||
* @group Account
|
||||
*/
|
||||
public function store(Asset $asset): JsonResponse
|
||||
{
|
||||
try {
|
||||
@@ -29,6 +34,11 @@ class CheckoutRequest extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel Asset Request
|
||||
*
|
||||
* @group Account
|
||||
*/
|
||||
public function destroy(Asset $asset): JsonResponse
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -15,8 +15,9 @@ use Illuminate\Http\JsonResponse;
|
||||
class CompaniesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Companies
|
||||
*
|
||||
* @group Companies
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -90,11 +91,12 @@ class CompaniesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Company
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Companies
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function store(ImageUploadRequest $request) : JsonResponse
|
||||
{
|
||||
@@ -112,11 +114,12 @@ class CompaniesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Company
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Companies
|
||||
* @param int $id
|
||||
* @since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function show($id) : array
|
||||
{
|
||||
@@ -129,12 +132,13 @@ class CompaniesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Company
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Companies
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
* @param int $id
|
||||
*@author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
public function update(ImageUploadRequest $request, $id) : JsonResponse
|
||||
{
|
||||
@@ -154,11 +158,12 @@ class CompaniesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Company
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Companies
|
||||
* @param int $id
|
||||
* @since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function destroy($id) : JsonResponse
|
||||
{
|
||||
@@ -177,8 +182,9 @@ class CompaniesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Companies
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -20,8 +20,9 @@ use Carbon\Carbon;
|
||||
class ComponentsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Categories
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*
|
||||
@@ -45,16 +46,40 @@ class ComponentsController extends Controller
|
||||
'qty',
|
||||
'image',
|
||||
'notes',
|
||||
// These are *relationships* so we wouldn't normally include them in this array,
|
||||
// since they would normally create a `column not found` error,
|
||||
// BUT we account for them in the ordering switch down at the end of this method
|
||||
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
|
||||
'company',
|
||||
'location',
|
||||
'category',
|
||||
'manufacturer',
|
||||
'supplier',
|
||||
|
||||
];
|
||||
|
||||
$components = Component::select('components.*')
|
||||
->with('company', 'location', 'category', 'assets', 'supplier', 'adminuser', 'manufacturer', 'uncontrainedAssets')
|
||||
->withSum('uncontrainedAssets', 'components_assets.assigned_qty');
|
||||
|
||||
if ($request->filled('search')) {
|
||||
$components = $components->TextSearch($request->input('search'));
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
if ((! is_null($filter)) && (count($filter)) > 0) {
|
||||
$components->ByFilter($filter);
|
||||
} elseif ($request->filled('search')) {
|
||||
$components->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
if ($request->filled('name')) {
|
||||
$components->where('name', '=', $request->input('name'));
|
||||
}
|
||||
@@ -127,8 +152,9 @@ class ComponentsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Component
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -148,8 +174,9 @@ class ComponentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Component
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
@@ -164,8 +191,9 @@ class ComponentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Component
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -187,8 +215,9 @@ class ComponentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Component
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -209,8 +238,9 @@ class ComponentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display all assets attached to a component
|
||||
* Component Assets
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Bergamasco] [@vjandrea]
|
||||
* @since [v4.0]
|
||||
* @param Request $request
|
||||
@@ -250,10 +280,10 @@ class ComponentsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Validate and checkout the component.
|
||||
* Checkout Component
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* t
|
||||
* @since [v5.1.8]
|
||||
* @param Request $request
|
||||
* @param int $componentId
|
||||
@@ -305,8 +335,9 @@ class ComponentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate and store checkin data.
|
||||
* Checkin Component
|
||||
*
|
||||
* @group Components
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v5.1.8]
|
||||
* @param Request $request
|
||||
|
||||
@@ -19,8 +19,21 @@ use Illuminate\Http\JsonResponse;
|
||||
class ConsumablesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Consumables
|
||||
*
|
||||
* @group Consumables
|
||||
* @queryParam filter string A JSON encoded array of key/value pairs to filter results by. Example: {"company":"1","location":"2"}
|
||||
* @queryParam search string A search term to filter results by.
|
||||
* @queryParam name string Filter by exact name.
|
||||
* @queryParam company_id integer Filter by exact company ID.
|
||||
* @queryParam category_id integer Filter by exact category ID.
|
||||
* @queryParam model_number string Filter by exact model number.
|
||||
* @queryParam manufacturer_id integer Filter by exact manufacturer ID.
|
||||
* @queryParam supplier_id integer Filter by exact supplier ID.
|
||||
* @queryParam location_id integer Filter by exact location ID.
|
||||
* @queryParam notes string Filter by exact notes.
|
||||
* @queryParam sort string The column to sort results by. Must be one of the following: id, name, order_number, min_amt, purchase_date, purchase_cost, company, category, model_number, item_no, manufacturer, location, qty, image, company, location, category, supplier, manufacturer. Default is created_at.
|
||||
* @queryParam order string The order to sort results by. Must be one of the following: asc, desc. Default is desc.
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -31,10 +44,53 @@ class ConsumablesController extends Controller
|
||||
$consumables = Consumable::with('company', 'location', 'category', 'supplier', 'manufacturer')
|
||||
->withCount('users as consumables_users_count');
|
||||
|
||||
if ($request->filled('search')) {
|
||||
$consumables = $consumables->TextSearch(e($request->input('search')));
|
||||
// This array is what determines which fields should be allowed to be sorted on ON the table itself.
|
||||
// These must match a column on the consumables table directly.
|
||||
$allowed_columns = [
|
||||
'id',
|
||||
'name',
|
||||
'order_number',
|
||||
'min_amt',
|
||||
'purchase_date',
|
||||
'purchase_cost',
|
||||
'company',
|
||||
'category',
|
||||
'model_number',
|
||||
'item_no',
|
||||
'manufacturer',
|
||||
'location',
|
||||
'qty',
|
||||
'image',
|
||||
// These are *relationships* so we wouldn't normally include them in this array,
|
||||
// since they would normally create a `column not found` error,
|
||||
// BUT we account for them in the ordering switch down at the end of this method
|
||||
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
|
||||
'company',
|
||||
'location',
|
||||
'category',
|
||||
'supplier',
|
||||
'manufacturer',
|
||||
];
|
||||
|
||||
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
if ((! is_null($filter)) && (count($filter)) > 0) {
|
||||
$consumables->ByFilter($filter);
|
||||
} elseif ($request->filled('search')) {
|
||||
$consumables->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
|
||||
if ($request->filled('name')) {
|
||||
$consumables->where('name', '=', $request->input('name'));
|
||||
}
|
||||
@@ -96,25 +152,6 @@ class ConsumablesController extends Controller
|
||||
$consumables = $consumables->OrderByCreatedBy($order);
|
||||
break;
|
||||
default:
|
||||
// This array is what determines which fields should be allowed to be sorted on ON the table itself.
|
||||
// These must match a column on the consumables table directly.
|
||||
$allowed_columns = [
|
||||
'id',
|
||||
'name',
|
||||
'order_number',
|
||||
'min_amt',
|
||||
'purchase_date',
|
||||
'purchase_cost',
|
||||
'company',
|
||||
'category',
|
||||
'model_number',
|
||||
'item_no',
|
||||
'manufacturer',
|
||||
'location',
|
||||
'qty',
|
||||
'image'
|
||||
];
|
||||
|
||||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
|
||||
$consumables = $consumables->orderBy($sort, $order);
|
||||
break;
|
||||
@@ -129,6 +166,7 @@ class ConsumablesController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @group Consumables
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -148,8 +186,9 @@ class ConsumablesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Consumable
|
||||
*
|
||||
* @group Consumables
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
@@ -162,8 +201,9 @@ class ConsumablesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Consumable
|
||||
*
|
||||
* @group Consumables
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -184,8 +224,9 @@ class ConsumablesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Consumable
|
||||
*
|
||||
* @group Consumables
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -201,8 +242,9 @@ class ConsumablesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JSON response containing details on the users associated with this consumable.
|
||||
* User Assignments
|
||||
*
|
||||
* @group Consumables
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @see \App\Http\Controllers\Consumables\ConsumablesController::getView() method that returns the form.
|
||||
* @since [v1.0]
|
||||
@@ -248,8 +290,9 @@ class ConsumablesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Checkout a consumable
|
||||
* Checkout Consumable
|
||||
*
|
||||
* @group Consumables
|
||||
* @author [A. Gutierrez] [<andres@baller.tv>]
|
||||
* @param int $id
|
||||
* @since [v4.9.5]
|
||||
@@ -310,8 +353,9 @@ class ConsumablesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Consumables
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
*/
|
||||
public function selectlist(Request $request) : array
|
||||
|
||||
@@ -14,8 +14,9 @@ use Illuminate\Http\JsonResponse;
|
||||
class CustomFieldsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Reorder the custom fields within a fieldset
|
||||
* List Custom Fields
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
|
||||
* @param int $id
|
||||
* @since [v3.0]
|
||||
@@ -30,7 +31,9 @@ class CustomFieldsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the given field
|
||||
* Show Field
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @author [V. Cordes] [<volker@fdatek.de>]
|
||||
* @param int $id
|
||||
* @since [v4.1.10]
|
||||
@@ -46,8 +49,9 @@ class CustomFieldsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified field
|
||||
* Update Field
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @author [V. Cordes] [<volker@fdatek.de>]
|
||||
* @since [v4.1.10]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -80,8 +84,9 @@ class CustomFieldsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created field.
|
||||
* Create Field
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @author [V. Cordes] [<volker@fdatek.de>]
|
||||
* @since [v4.1.10]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -112,6 +117,12 @@ class CustomFieldsController extends Controller
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $field->getErrors()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reorder Fields
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function postReorder(Request $request, $id)
|
||||
{
|
||||
$fieldset = CustomFieldset::find($id);
|
||||
@@ -134,6 +145,12 @@ class CustomFieldsController extends Controller
|
||||
return $fieldset->fields()->sync($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Field to Fieldset
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function associate(Request $request, $field_id) : JsonResponse
|
||||
{
|
||||
$this->authorize('update', CustomFieldset::class);
|
||||
@@ -153,6 +170,12 @@ class CustomFieldsController extends Controller
|
||||
return response()->json(Helper::formatStandardApiResponse('success', $fieldset, trans('admin/custom_fields/message.fieldset.update.success')));
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove Field from Fieldset
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function disassociate(Request $request, $field_id) : JsonResponse
|
||||
{
|
||||
$this->authorize('update', CustomFieldset::class);
|
||||
@@ -172,8 +195,9 @@ class CustomFieldsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a custom field.
|
||||
* Delete Field
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @author [Brady Wetherington] [<uberbrady@gmail.com>]
|
||||
* @since [v1.8]
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,10 @@ use Illuminate\Http\JsonResponse;
|
||||
class CustomFieldsetsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Shows the given fieldset and its fields
|
||||
* List Fieldsets
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @author [Josh Gibson]
|
||||
* @param int $id
|
||||
@@ -39,10 +42,13 @@ class CustomFieldsetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the given fieldset and its fields
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @author [Josh Gibson]
|
||||
* Show Fieldset and Fields
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @param int $id
|
||||
* @author [Josh Gibson]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v1.8]
|
||||
*/
|
||||
public function show($id) : JsonResponse | array
|
||||
@@ -56,12 +62,14 @@ class CustomFieldsetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Fieldset
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
*@author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
public function update(Request $request, $id) : JsonResponse
|
||||
{
|
||||
@@ -77,11 +85,13 @@ class CustomFieldsetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Fieldset
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function store(Request $request) : JsonResponse
|
||||
{
|
||||
@@ -109,8 +119,10 @@ class CustomFieldsetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a custom fieldset.
|
||||
* Delete Fieldset
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -134,12 +146,14 @@ class CustomFieldsetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON containing a list of fields belonging to a fieldset.
|
||||
* Show Fields in Fieldset
|
||||
*
|
||||
* @author [V. Cordes] [<volker@fdatek.de>]
|
||||
* @since [v4.1.10]
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @param $fieldsetId
|
||||
* @return string JSON
|
||||
* @author [V. Cordes] [<volker@fdatek.de>]
|
||||
* @since [v4.1.10]
|
||||
*/
|
||||
public function fields($id) : array
|
||||
{
|
||||
@@ -151,9 +165,10 @@ class CustomFieldsetsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON containing a list of fields belonging to a fieldset with the
|
||||
* default values for a given model
|
||||
* Fields in Fieldset with Default Values for Model
|
||||
*
|
||||
* @group Custom Fields
|
||||
* @subgroup Custom Fieldsets
|
||||
* @param $modelId
|
||||
* @param $fieldsetId
|
||||
* @return string JSON
|
||||
|
||||
@@ -15,8 +15,18 @@ use Illuminate\Http\JsonResponse;
|
||||
class DepartmentsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Departments
|
||||
*
|
||||
* @group Departments
|
||||
* @queryParam search string Search term to filter results. Example: IT
|
||||
* @queryParam name string Filter by exact department name. Example: IT
|
||||
* @queryParam company_id integer Filter by exact company ID. Example: 1
|
||||
* @queryParam manager_id integer Filter by exact manager (user) ID. Example:
|
||||
* @queryParam location_id integer Filter by exact location ID. Example: 1
|
||||
* @queryParam sort string Column to sort results by. Allowed values: id, name, image, users_count, notes, created_at, updated_at, location, manager, company. Default: created_at. Example: name
|
||||
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
|
||||
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
|
||||
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
|
||||
* @author [Godfrey Martinez] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -88,8 +98,9 @@ class DepartmentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Department
|
||||
*
|
||||
* @group Departments
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -112,8 +123,9 @@ class DepartmentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Department
|
||||
*
|
||||
* @group Departments
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -126,8 +138,9 @@ class DepartmentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Department
|
||||
*
|
||||
* @group Departments
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v5.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -149,8 +162,9 @@ class DepartmentsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Validates and deletes selected department.
|
||||
* Delete Department
|
||||
*
|
||||
* @group Departments
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $locationId
|
||||
* @since [v4.0]
|
||||
@@ -171,8 +185,9 @@ class DepartmentsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Departments
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -12,8 +12,9 @@ use Illuminate\Http\JsonResponse;
|
||||
class DepreciationsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Depreciations
|
||||
*
|
||||
* @group Depreciations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -65,8 +66,9 @@ class DepreciationsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Depreciation
|
||||
*
|
||||
* @group Depreciations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -85,8 +87,9 @@ class DepreciationsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Depreciation
|
||||
*
|
||||
* @group Depreciations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -100,8 +103,9 @@ class DepreciationsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Depreciation
|
||||
*
|
||||
* @group Depreciations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -121,8 +125,9 @@ class DepreciationsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Depreciation
|
||||
*
|
||||
* @group Depreciations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
|
||||
@@ -15,6 +15,7 @@ class GroupsController extends Controller
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @group User Groups
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -65,8 +66,9 @@ class GroupsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Group
|
||||
*
|
||||
* @group User Groups
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -92,8 +94,9 @@ class GroupsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Group
|
||||
*
|
||||
* @group User Groups
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -106,8 +109,9 @@ class GroupsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Group
|
||||
*
|
||||
* @group User Groups
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -132,6 +136,7 @@ class GroupsController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @group User Groups
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
|
||||
@@ -24,8 +24,9 @@ use Illuminate\Http\JsonResponse;
|
||||
class ImportController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Import Files
|
||||
*
|
||||
* @group Imports
|
||||
*/
|
||||
public function index() : JsonResponse | array
|
||||
{
|
||||
@@ -35,8 +36,9 @@ class ImportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Process and store a CSV upload file.
|
||||
* Save Import File
|
||||
*
|
||||
* @group Imports
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function store() : JsonResponse
|
||||
@@ -184,8 +186,9 @@ class ImportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the specified Import.
|
||||
* Process Import
|
||||
*
|
||||
* @group Imports
|
||||
* @param int $import_id
|
||||
*/
|
||||
public function process(ItemImportRequest $request, $import_id) : JsonResponse
|
||||
@@ -255,8 +258,9 @@ class ImportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Import File
|
||||
*
|
||||
* @group Imports
|
||||
* @param int $import_id
|
||||
*/
|
||||
public function destroy($import_id) : JsonResponse
|
||||
|
||||
@@ -13,8 +13,9 @@ use Illuminate\Http\JsonResponse;
|
||||
class LabelsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Returns JSON listing of all labels.
|
||||
* List Labels
|
||||
*
|
||||
* @group Labels
|
||||
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
|
||||
*/
|
||||
public function index(Request $request) : JsonResponse | array
|
||||
@@ -45,8 +46,9 @@ class LabelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns JSON with information about a label for detail view.
|
||||
* Show Label
|
||||
*
|
||||
* @group Labels
|
||||
* @author Grant Le Roux <grant.leroux+snipe-it@gmail.com>
|
||||
* @param string $labelName
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,10 @@ use Illuminate\Http\Request;
|
||||
class LicenseSeatsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List License Seats
|
||||
*
|
||||
* @group Licenses
|
||||
* @subgroup License Seats
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $licenseId
|
||||
*/
|
||||
@@ -68,8 +70,10 @@ class LicenseSeatsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show License Seat
|
||||
*
|
||||
* @group Licenses
|
||||
* @subgroup License Seats
|
||||
* @param int $licenseId
|
||||
* @param int $seatId
|
||||
*/
|
||||
@@ -91,8 +95,10 @@ class LicenseSeatsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update License Seat
|
||||
*
|
||||
* @group Licenses
|
||||
* @subgroup License Seats
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $licenseId
|
||||
* @param int $seatId
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Http\Controllers\Controller;
|
||||
use App\Http\Transformers\LicensesTransformer;
|
||||
use App\Http\Transformers\SelectlistTransformer;
|
||||
use App\Models\License;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
@@ -14,8 +15,17 @@ use Illuminate\Http\JsonResponse;
|
||||
class LicensesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Licenses
|
||||
*
|
||||
* @group Licenses
|
||||
* @queryParam status string Filter by license status. Options: active, inactive, expiring Example: ?status=active
|
||||
* @queryParam company_id integer Filter by exact company ID. Example: 1
|
||||
* @queryParam name string Filter by exact license name. Example: Microsoft 365
|
||||
* @queryParam product_key string Filter by exact product key. Example: W269N
|
||||
* @queryParam order_number string Filter by exact order number. Example: 12345
|
||||
* @queryParam purchase_order string Filter by exact purchase order. Example: PO12345
|
||||
* @queryParam license_name string Filter by exact licensee name. Example: John Doe
|
||||
* @queryParam license_email string Filter by exact licensee email. Example: john.d
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*
|
||||
@@ -25,9 +35,12 @@ class LicensesController extends Controller
|
||||
$this->authorize('view', License::class);
|
||||
|
||||
$licenses = License::with('company', 'manufacturer', 'supplier','category', 'adminuser')->withCount('freeSeats as free_seats_count');
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($request->input('status')=='inactive') {
|
||||
$licenses->ExpiredLicenses();
|
||||
} elseif ($request->input('status')=='expiring') {
|
||||
$licenses->ExpiringLicenses($settings->alert_interval);
|
||||
} else {
|
||||
$licenses->ActiveLicenses();
|
||||
}
|
||||
@@ -162,8 +175,9 @@ class LicensesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create License
|
||||
*
|
||||
* @group Licenses
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -182,8 +196,9 @@ class LicensesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show License
|
||||
*
|
||||
* @group Licenses
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
@@ -197,8 +212,9 @@ class LicensesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update License
|
||||
*
|
||||
* @group Licenses
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -220,8 +236,9 @@ class LicensesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete License
|
||||
*
|
||||
* @group Licenses
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -249,8 +266,9 @@ class LicensesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Licenses
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
*/
|
||||
public function selectlist(Request $request) : array
|
||||
|
||||
@@ -23,11 +23,26 @@ use Illuminate\Support\Collection;
|
||||
class LocationsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Locations
|
||||
*
|
||||
* @group Locations
|
||||
* @queryParam search string Search term to filter results. Example: Headquarters
|
||||
* @queryParam name string Filter by exact location name. Example: Headquarters
|
||||
* @queryParam address string Filter by exact address. Example: 123 Main St
|
||||
* @queryParam address2 string Filter by exact address2. Example: Suite 100
|
||||
* @queryParam city string Filter by exact city. Example: Springfield
|
||||
* @queryParam zip string Filter by exact zip code. Example: 12345
|
||||
* @queryParam country string Filter by exact country. Example: USA
|
||||
* @queryParam manager_id integer Filter by exact manager (user) ID. Example: 1
|
||||
* @queryParam company_id integer Filter by exact company ID. Example: 1
|
||||
* @queryParam parent_id integer Filter by exact parent location ID. Example: 1
|
||||
* @queryParam status string Filter by location status. Allowed values: active, deleted. Example: active
|
||||
* @queryParam sort string Column to sort results by. Allowed values: accessorries_count, address, address2, assets_count, assigned_assets_count, rtd_assets_count, accessories_count, assigned_accessories_count, components_count, consumables_count, users_count, children_count, city, country, created_at, currency, id, image, ldap_ou, company_id, manager_id, name, rtd_assets_count, state, updated_at, zip. Default: created_at. Example: name
|
||||
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
* @since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function index(Request $request) : JsonResponse | array
|
||||
{
|
||||
@@ -152,8 +167,6 @@ class LocationsController extends Controller
|
||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'created_at';
|
||||
|
||||
|
||||
|
||||
switch ($request->input('sort')) {
|
||||
case 'parent':
|
||||
$locations->OrderParent($order);
|
||||
@@ -178,8 +191,9 @@ class LocationsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -208,8 +222,9 @@ class LocationsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -252,8 +267,9 @@ class LocationsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -295,7 +311,13 @@ class LocationsController extends Controller
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $location->getErrors()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show Assets with Default Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
public function assets(Request $request, Location $location) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
@@ -305,6 +327,13 @@ class LocationsController extends Controller
|
||||
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show Assets Assigned to Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
public function assignedAssets(Request $request, Location $location) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('view', Asset::class);
|
||||
@@ -314,6 +343,13 @@ class LocationsController extends Controller
|
||||
return (new AssetsTransformer)->transformAssets($assets, $assets->count(), $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show Accessories Assigned to Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
public function assignedAccessories(Request $request, Location $location) : JsonResponse | array
|
||||
{
|
||||
$this->authorize('view', Accessory::class);
|
||||
@@ -329,8 +365,9 @@ class LocationsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Location
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -384,6 +421,7 @@ class LocationsController extends Controller
|
||||
* Recursion still sucks, but I guess he doesn't have to get in the
|
||||
* sea... this time.
|
||||
*
|
||||
* @group Locations
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -22,8 +22,19 @@ class MaintenancesController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Generates the JSON response for asset maintenances listing view.
|
||||
* List Maintenances
|
||||
*
|
||||
* @group Maintenances
|
||||
* @queryParam search string Search term to filter results. Example: repair
|
||||
* @queryParam asset_id integer Filter by exact asset ID. Example: 1
|
||||
* @queryParam supplier_id integer Filter by exact supplier ID. Example: 1
|
||||
* @queryParam created_by integer Filter by exact user ID who created the maintenance. Example
|
||||
* @queryParam url string Filter by exact URL. Example: http://example.com
|
||||
* @queryParam asset_maintenance_type string Filter by exact maintenance type. Example: repair
|
||||
* @queryParam sort string Column to sort results by. Allowed values: id, name, asset_maintenance_time, asset_maintenance_type, cost, start_date, completion_date, notes, asset_tag, asset_name, serial, created_by, supplier, location, is_warranty, status_label. Default: created_at. Example: name
|
||||
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
|
||||
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
|
||||
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
|
||||
* @see MaintenancesController::getIndex() method that generates view
|
||||
* @author Vincent Sposato <vincent.sposato@gmail.com>
|
||||
* @version v1.0
|
||||
@@ -52,6 +63,10 @@ class MaintenancesController extends Controller
|
||||
$maintenances->where('maintenances.created_by', '=', $request->input('created_by'));
|
||||
}
|
||||
|
||||
if ($request->filled('url')) {
|
||||
$maintenances->where('maintenances.url', '=', $request->input('url'));
|
||||
}
|
||||
|
||||
if ($request->filled('asset_maintenance_type')) {
|
||||
$maintenances->where('asset_maintenance_type', '=', $request->input('asset_maintenance_type'));
|
||||
}
|
||||
@@ -119,8 +134,9 @@ class MaintenancesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Validates and stores the new asset maintenance
|
||||
* Create Maintenance
|
||||
*
|
||||
* @group Maintenances
|
||||
* @see MaintenancesController::getCreate() method for the form
|
||||
* @author Vincent Sposato <vincent.sposato@gmail.com>
|
||||
* @version v1.0
|
||||
@@ -146,8 +162,9 @@ class MaintenancesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates and stores an update to an asset maintenance
|
||||
* Update Maintenance
|
||||
*
|
||||
* @group Maintenances
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @param int $id
|
||||
* @param int $request
|
||||
@@ -184,8 +201,9 @@ class MaintenancesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an asset maintenance
|
||||
* Delete Maintenance
|
||||
*
|
||||
* @group Maintenances
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @param int $maintenanceId
|
||||
* @version v1.0
|
||||
@@ -206,8 +224,9 @@ class MaintenancesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* View an asset maintenance
|
||||
* View Maintenance
|
||||
*
|
||||
* @group Maintenances
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @param int $maintenanceId
|
||||
* @version v1.0
|
||||
|
||||
@@ -16,8 +16,20 @@ use Illuminate\Http\JsonResponse;
|
||||
class ManufacturersController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Manufacturers
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @queryParam search string Search term to filter results. Example: Dell
|
||||
* @queryParam name string Filter by exact manufacturer name. Example: Dell
|
||||
* @queryParam url string Filter by exact URL. Example: http://example.com
|
||||
* @queryParam support_url string Filter by exact support URL. Example: http://support.example.com
|
||||
* @queryParam warranty_lookup_url string Filter by exact warranty lookup URL. Example: http://warranty.example.com
|
||||
* @queryParam support_phone string Filter by exact support phone number. Example: 1-800-555-5555
|
||||
* @queryParam support_email string Filter by exact support email address. Example: support@example.org
|
||||
* @queryParam sort string Column to sort results by. Allowed values: id, name, url, support_url, support_email, warranty_lookup_url, support_phone, created_at, updated_at, assets_count, consumables_count, components_count, licenses_count. Default: created_at. Example: name
|
||||
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
|
||||
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
|
||||
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return \Illuminate\Http\Response
|
||||
@@ -120,8 +132,9 @@ class ManufacturersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Maintenance
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -141,8 +154,9 @@ class ManufacturersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Manufacturer
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -156,8 +170,9 @@ class ManufacturersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Manufacturer
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -178,8 +193,9 @@ class ManufacturersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Manufacturer
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -200,8 +216,9 @@ class ManufacturersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a given Manufacturer (mark as un-deleted)
|
||||
* Restore Deleted Manufacturer
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v6.3.4]
|
||||
* @param int $id
|
||||
@@ -237,8 +254,9 @@ class ManufacturersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Manufacturers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -19,12 +19,14 @@ use Illuminate\Support\Facades\Log;
|
||||
class NotesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Retrieve a list of manual notes (action logs) for a given asset.
|
||||
* List Notes
|
||||
*
|
||||
* Checks authorization to view assets, attempts to find the asset by ID,
|
||||
* and fetches related action log entries of type 'note added', including
|
||||
* user information for each note. Returns a JSON response with the notes or errors.
|
||||
*
|
||||
* @group Notes
|
||||
* @subgroup Assets
|
||||
* @param \Illuminate\Http\Request $request The incoming HTTP request.
|
||||
* @param Asset $asset The ID of the asset whose notes to retrieve.
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
@@ -59,12 +61,14 @@ class NotesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a manual note on a specified asset and log the action.
|
||||
* Store Note
|
||||
*
|
||||
* Checks authorization for updating assets, validates the presence of the 'note',
|
||||
* attempts to find the asset by ID, and creates a new ActionLog entry if successful.
|
||||
* Returns JSON responses indicating success or failure with appropriate HTTP status codes.
|
||||
*
|
||||
* @group Notes
|
||||
* @subgroup Assets
|
||||
* @param \Illuminate\Http\Request $request The incoming HTTP request containing the 'note'.
|
||||
* @param Asset $asset The ID of the asset to attach the note to.
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
|
||||
@@ -16,8 +16,9 @@ use App\Http\Transformers\SelectlistTransformer;
|
||||
class PredefinedKitsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Kits
|
||||
*
|
||||
* @group Predefined Kits
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index(Request $request) : JsonResponse | array
|
||||
@@ -62,8 +63,9 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Kit
|
||||
*
|
||||
* @group Predefined Kits
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*/
|
||||
public function store(Request $request) : JsonResponse
|
||||
@@ -80,9 +82,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Kit
|
||||
*
|
||||
* @param int $id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $id int required The ID of the kit. Example: 1
|
||||
*/
|
||||
public function show($id) : array
|
||||
{
|
||||
@@ -93,10 +96,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Kit
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id kit id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $id int required The ID of the kit. Example: 1
|
||||
*/
|
||||
public function update(Request $request, $id) : JsonResponse
|
||||
{
|
||||
@@ -112,9 +115,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Kit
|
||||
*
|
||||
* @param int $id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $id int required The ID of the kit. Example: 1
|
||||
*/
|
||||
public function destroy($id) : JsonResponse
|
||||
{
|
||||
@@ -133,8 +137,9 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Predefined Kits
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
*/
|
||||
public function selectlist(Request $request) : array
|
||||
@@ -154,9 +159,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* List Licenses in Kit
|
||||
*
|
||||
* @param int $id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function indexLicenses($kit_id) : array
|
||||
@@ -169,9 +175,12 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the specified resource.
|
||||
* Add License to Kit
|
||||
*
|
||||
* @param int $id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @bodyParam license int required The ID of the license. Example: 1
|
||||
* @bodyParam quantity int The quantity of the license. Example: 1
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function storeLicense(Request $request, $kit_id) : JsonResponse
|
||||
@@ -196,10 +205,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update License in Kit
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $license_id int required The ID of the license. Example: 1
|
||||
*/
|
||||
public function updateLicense(Request $request, $kit_id, $license_id) : JsonResponse
|
||||
{
|
||||
@@ -215,9 +225,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Remove License from Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $license_id int required The ID of the license. Example: 1
|
||||
*/
|
||||
public function detachLicense($kit_id, $license_id) : JsonResponse
|
||||
{
|
||||
@@ -230,9 +242,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* List Models in Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
*/
|
||||
public function indexModels($kit_id) : array
|
||||
{
|
||||
@@ -244,9 +257,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the specified resource.
|
||||
* Add Model to Kit
|
||||
*
|
||||
* @param int $id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @bodyParam model int required The ID of the model. Example: 1
|
||||
*/
|
||||
public function storeModel(Request $request, $kit_id) : JsonResponse
|
||||
{
|
||||
@@ -270,10 +285,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Model in Kit
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @bodyParam quantity int required The quantity of the model. Example: 1
|
||||
*/
|
||||
public function updateModel(Request $request, $kit_id, $model_id) : JsonResponse
|
||||
{
|
||||
@@ -289,9 +305,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Model from Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $model_id int required The ID of the model. Example: 1
|
||||
*/
|
||||
public function detachModel($kit_id, $model_id) : JsonResponse
|
||||
{
|
||||
@@ -304,9 +322,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* List Consumables in Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
*/
|
||||
public function indexConsumables($kit_id) : array
|
||||
{
|
||||
@@ -318,9 +337,12 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the specified resource.
|
||||
* Add Consumable to Kit
|
||||
*
|
||||
* @param int $id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @bodyParam consumable int required The ID of the consumable. Example: 1
|
||||
* @bodyParam quantity int The quantity of the consumable. Example: 1
|
||||
*/
|
||||
public function storeConsumable(Request $request, $kit_id) : JsonResponse
|
||||
{
|
||||
@@ -344,10 +366,12 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Consumable in Kit
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $consumable_id int required The ID of the consumable. Example: 1
|
||||
* @bodyParam quantity int The quantity of the consumable. Example: 1
|
||||
*/
|
||||
public function updateConsumable(Request $request, $kit_id, $consumable_id) : JsonResponse
|
||||
{
|
||||
@@ -363,9 +387,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Remove Consumable from Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $consumable_id int required The ID of the consumable. Example: 1
|
||||
*/
|
||||
public function detachConsumable($kit_id, $consumable_id) : JsonResponse
|
||||
{
|
||||
@@ -378,9 +404,10 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* List Accessories in Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
*/
|
||||
public function indexAccessories($kit_id) : array
|
||||
{
|
||||
@@ -392,9 +419,12 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the specified resource.
|
||||
* Add Accessory to Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @bodyParam accessory int required The ID of the accessory. Example: 1
|
||||
* @bodyParam quantity int The quantity of the accessory. Example: 1
|
||||
*/
|
||||
public function storeAccessory(Request $request, $kit_id) : JsonResponse
|
||||
{
|
||||
@@ -418,10 +448,12 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Accessory in Kit
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $accessory_id int required The ID of the accessory. Example: 1
|
||||
* @bodyParam quantity int The quantity of the accessory. Example: 1
|
||||
*/
|
||||
public function updateAccessory(Request $request, $kit_id, $accessory_id) : JsonResponse
|
||||
{
|
||||
@@ -437,9 +469,11 @@ class PredefinedKitsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Remove Accessory from Kit
|
||||
*
|
||||
* @param int $kit_id
|
||||
* @group Predefined Kits
|
||||
* @urlParam $kit_id int required The ID of the kit. Example: 1
|
||||
* @urlParam $accessory_id int required The ID of the accessory. Example: 1
|
||||
*/
|
||||
public function detachAccessory($kit_id, $accessory_id) : JsonResponse
|
||||
{
|
||||
|
||||
@@ -42,8 +42,9 @@ class ProfileController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of requested assets.
|
||||
* Display Requested Assets
|
||||
*
|
||||
* @group Account
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.3.0]
|
||||
*/
|
||||
@@ -93,8 +94,8 @@ class ProfileController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Delete an API token
|
||||
*
|
||||
* Create API token
|
||||
* @group Account
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v6.0.5]
|
||||
*/
|
||||
@@ -122,8 +123,9 @@ class ProfileController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Delete an API token
|
||||
* Delete API token
|
||||
*
|
||||
* @group Account
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v6.0.5]
|
||||
*/
|
||||
@@ -150,8 +152,9 @@ class ProfileController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Show user's API tokens
|
||||
* Show API tokens
|
||||
*
|
||||
* @group Account
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v6.0.5]
|
||||
*/
|
||||
@@ -172,11 +175,12 @@ class ProfileController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the EULAs accepted by the user.
|
||||
* Display Accepted EULAs
|
||||
*
|
||||
* @group Account
|
||||
* @param \App\Http\Transformers\ActionlogsTransformer $transformer
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*@since [v8.1.16]
|
||||
* @since [v8.1.16]
|
||||
* @author [Godfrey Martinez] [<gmartinez@grokability.com>]
|
||||
*/
|
||||
public function eulas(ProfileTransformer $transformer)
|
||||
|
||||
@@ -13,8 +13,23 @@ use Illuminate\Http\JsonResponse;
|
||||
class ReportsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Returns Activity Report JSON.
|
||||
* Activity Report
|
||||
*
|
||||
* @group Reports
|
||||
* @queryParam search string Search term to filter results Example: updated
|
||||
* @queryParam target_type string Filter by target type Example: user
|
||||
* @queryParam target_id integer Filter by target ID Example: 1
|
||||
* @queryParam item_type string Filter by item type Example: asset
|
||||
* @queryParam item_id integer Filter by item ID Example: 1
|
||||
* @queryParam action_type string Filter by action type Example: create
|
||||
* @queryParam created_by integer Filter by user ID who created the log Example: 1
|
||||
* @queryParam action_source string Filter by action source Example: web
|
||||
* @queryParam remote_ip string Filter by remote IP address Example: No-example
|
||||
* @queryParam uploads boolean Filter to only show logs with file uploads Example: true
|
||||
* @queryParam sort string Column to sort by. Allowed values: id, created_at, target_id, created_by, accept_signature, action_type, note, remote_ip, user_agent, target_type, item_type, action_source, action_date. Default is created_at. Example: created_at
|
||||
* @queryParam order string Order of sorting. Allowed values: asc, desc. Default is desc. Example: desc
|
||||
* @queryParam offset integer Number of records to skip for pagination. Default is 0. Example: 0
|
||||
* @queryParam limit integer Maximum number of records to return. Default is 25. Example: 25
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
|
||||
@@ -23,6 +23,12 @@ class SettingsController extends Controller
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* Test LDAP Connection
|
||||
*
|
||||
* @group Settings
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function ldaptest() : JsonResponse
|
||||
{
|
||||
$settings = Setting::getSettings();
|
||||
@@ -95,6 +101,13 @@ class SettingsController extends Controller
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Test LDAP Login
|
||||
*
|
||||
* @group Settings
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function ldaptestlogin(Request $request) : JsonResponse
|
||||
{
|
||||
|
||||
@@ -151,8 +164,9 @@ class SettingsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the email configuration
|
||||
* Test Email Configuration
|
||||
*
|
||||
* @group Settings
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
*/
|
||||
@@ -175,8 +189,9 @@ class SettingsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Delete server-cached barcodes
|
||||
* Delete Barcode Cache
|
||||
*
|
||||
* @group Settings
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v5.0.0]
|
||||
*/
|
||||
@@ -216,6 +231,7 @@ class SettingsController extends Controller
|
||||
/**
|
||||
* Get a list of login attempts
|
||||
*
|
||||
* @group Settings
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v5.0.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -239,6 +255,7 @@ class SettingsController extends Controller
|
||||
/**
|
||||
* Lists backup files
|
||||
*
|
||||
* @group Settings
|
||||
* @author [A. Gianotto]
|
||||
*/
|
||||
public function listBackups() : array
|
||||
@@ -279,9 +296,11 @@ class SettingsController extends Controller
|
||||
|
||||
/**
|
||||
* Downloads a backup file.
|
||||
*
|
||||
* We use response()->download() here instead of Storage::download() because Storage::download()
|
||||
* exhausts memory on larger files.
|
||||
*
|
||||
* @group Settings
|
||||
* @author [A. Gianotto]
|
||||
*/
|
||||
public function downloadBackup($file) : JsonResponse | BinaryFileResponse
|
||||
@@ -301,6 +320,7 @@ class SettingsController extends Controller
|
||||
/**
|
||||
* Determines and downloads the latest backup
|
||||
*
|
||||
* @group Settings
|
||||
* @author [A. Gianotto]
|
||||
* @since [v6.3.1]
|
||||
*/
|
||||
|
||||
@@ -17,7 +17,11 @@ use Illuminate\Http\JsonResponse;
|
||||
class StatuslabelsController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* Show Status Labels
|
||||
*
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @queryParam search string Search term to filter results. Example: Inventory
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
@@ -85,9 +89,11 @@ class StatuslabelsController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @param \Illuminate\Http\Request $request
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function store(Request $request) : JsonResponse
|
||||
{
|
||||
@@ -119,11 +125,13 @@ class StatuslabelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Status Labels
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @param int $id
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function show($id) : array
|
||||
{
|
||||
@@ -135,12 +143,14 @@ class StatuslabelsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Status Label
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
*@author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
public function update(Request $request, $id) : JsonResponse
|
||||
{
|
||||
@@ -172,11 +182,13 @@ class StatuslabelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Status Label
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @param int $id
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function destroy($id) : JsonResponse
|
||||
{
|
||||
@@ -197,8 +209,10 @@ class StatuslabelsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Show a count of assets by status label for pie chart
|
||||
* Show Count for Pie Chart
|
||||
*
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
*/
|
||||
@@ -229,8 +243,10 @@ class StatuslabelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a count of assets by meta status type for pie chart
|
||||
* Show Count for Pie Chart by Meta Status
|
||||
*
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v6.0.11]
|
||||
*/
|
||||
@@ -257,11 +273,13 @@ class StatuslabelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Assets with Status Label
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @param int $id
|
||||
*@since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function assets(Request $request, $id) : array
|
||||
{
|
||||
@@ -289,6 +307,8 @@ class StatuslabelsController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Check for Deployable Status
|
||||
*
|
||||
* Returns a boolean response based on whether the status label
|
||||
* is one that is deployable or pending.
|
||||
*
|
||||
@@ -296,7 +316,8 @@ class StatuslabelsController extends Controller
|
||||
* we should provide a dropdown of users for them to check the asset out to,
|
||||
* and whether we show a warning that the asset will be checked in if it's already
|
||||
* assigned but the status is changed to one that isn't pending or deployable
|
||||
*
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*/
|
||||
@@ -311,8 +332,10 @@ class StatuslabelsController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Status Labels
|
||||
* @subgroup Assets
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v6.1.1]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -15,11 +15,30 @@ use Illuminate\Http\JsonResponse;
|
||||
class SuppliersController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Suppliers
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @group Suppliers
|
||||
* @queryParam search string Search term to filter results. Example: Acme
|
||||
* @queryParam name string Filter by exact supplier name. Example: Acme Corp
|
||||
* @queryParam address string Filter by exact address. Example: 123 Main St
|
||||
* @queryParam address2 string Filter by exact address2. Example: Suite 100
|
||||
* @queryParam city string Filter by exact city. Example: Springfield
|
||||
* @queryParam state string Filter by exact state. Example: IL
|
||||
* @queryParam zip string Filter by exact zip code. Example: 62701
|
||||
* @queryParam country string Filter by exact country. Example: USA
|
||||
* @queryParam phone string Filter by exact phone number. Example: 555-1234
|
||||
* @queryParam fax string Filter by exact fax number. Example: 555-5678
|
||||
* @queryParam email string Filter by exact email address. Example: info@example.org
|
||||
* @queryParam url string Filter by exact URL. Example: http://example.com
|
||||
* @queryParam notes string Filter by exact notes. Example: This is a note.
|
||||
* @queryParam sort string Column to sort results by. Allowed values: id, name, address, address2, city, state, country, zip, phone, contact, fax, email, image, assets_count, licenses_count, accessories_count, components_count, consumables_count, url, notes. Default: created_at. Example: name
|
||||
* @queryParam order string Order of sorted results. Allowed values: asc, desc. Default: desc. Example: asc
|
||||
* @queryParam offset integer Offset/starting position of the results. Default: 0. Example: 0
|
||||
* @queryParam limit integer Limit the number of results returned. Default: 25. Maximum: 100. Example: 50
|
||||
* @see SuppliersController::getIndex()
|
||||
* @return \Illuminate\Http\Response
|
||||
* @since [v4.0]
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
*/
|
||||
public function index(Request $request): array
|
||||
{
|
||||
@@ -126,8 +145,9 @@ class SuppliersController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create Supplier
|
||||
*
|
||||
* @group Suppliers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -147,8 +167,9 @@ class SuppliersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show Supplier
|
||||
*
|
||||
* @group Suppliers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -163,8 +184,9 @@ class SuppliersController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update Supplier
|
||||
*
|
||||
* @group Suppliers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \App\Http\Requests\ImageUploadRequest $request
|
||||
@@ -185,8 +207,9 @@ class SuppliersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete Supplier
|
||||
*
|
||||
* @group Suppliers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -216,8 +239,9 @@ class SuppliersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Suppliers
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
|
||||
@@ -20,8 +20,9 @@ class UploadedFilesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* List files for an object
|
||||
* List Files for an Object
|
||||
*
|
||||
* @group Files
|
||||
* @param \App\Http\Requests\UploadFileRequest $request
|
||||
* @param string $object_type the type of object to upload the file to
|
||||
* @param int $id the ID of the object to list files for
|
||||
@@ -80,8 +81,9 @@ class UploadedFilesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Accepts a POST to upload a file to the server.
|
||||
* Upload File to an Object
|
||||
*
|
||||
* @group Files
|
||||
* @param \App\Http\Requests\UploadFileRequest $request
|
||||
* @param string $object_type the type of object to upload the file to
|
||||
* @param int $id the ID of the object to store so we can check permisisons
|
||||
@@ -128,8 +130,9 @@ class UploadedFilesController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Check for permissions and display the file.
|
||||
* Display File
|
||||
*
|
||||
* @group Files
|
||||
* @param \App\Http\Requests\UploadFileRequest $request
|
||||
* @param string $object_type the type of object to upload the file to
|
||||
* @param int $id the ID of the object to delete from so we can check permisisons
|
||||
@@ -171,8 +174,9 @@ class UploadedFilesController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the associated file
|
||||
* Delete File
|
||||
*
|
||||
* @group Files
|
||||
* @param \App\Http\Requests\UploadFileRequest $request
|
||||
* @param string $object_type the type of object to upload the file to
|
||||
* @param int $id the ID of the object to delete from so we can check permisisons
|
||||
@@ -193,8 +197,12 @@ class UploadedFilesController extends Controller
|
||||
|
||||
|
||||
// Check for the file
|
||||
$log = Actionlog::find($file_id)->where('item_type', self::$map_object_type[$object_type])
|
||||
->where('item_id', $object->id)->first();
|
||||
$log = Actionlog::query()
|
||||
->where('id', $file_id)
|
||||
->where('action_type', 'uploaded')
|
||||
->where('item_type', self::$map_object_type[$object_type])
|
||||
->where('item_id', $object->id)
|
||||
->first();
|
||||
|
||||
if ($log) {
|
||||
// Check the file actually exists, and delete it
|
||||
|
||||
@@ -35,8 +35,36 @@ use Illuminate\Http\JsonResponse;
|
||||
class UsersController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* List Users
|
||||
*
|
||||
* @group Users
|
||||
* @queryParam search string Search term to filter results. Example: John
|
||||
* @queryParam filter string JSON object of key/value pairs to filter results. Allowed keys: last_name, first_name, display_name, email, jobtitle, username, employee_num, groups, activated, created_at, updated_at, two_factor_enrolled, two_factor_optin, last_login, assets_count, licenses_count, consumables_count, accessories_count, manages_users_count, manages_locations_count, phone, mobile, address, city, state, country, zip, id, ldap_import, remote, vip, start_date, end_date, autoassign_licenses, website, locale, notes. Example: {"last_name":"Doe","first_name":"John"}
|
||||
* @queryParam activated integer Filter by exact activation status. Allowed values: 0, 1. Example: 1
|
||||
* @queryParam admins boolean Filter to only admin and superadmin users. Allowed values: true, false. Example: true
|
||||
* @queryParam superadmins boolean Filter to only superadmin users. Allowed values: true, false. Example: true
|
||||
* @queryParam company_id integer Filter by exact company ID. Example: 1
|
||||
* @queryParam phone string Filter by exact phone number. Example: 555-1234
|
||||
* @queryParam mobile string Filter by exact mobile number. Example: 555-5678
|
||||
* @queryParam location_id integer Filter by exact location ID. Example: 1
|
||||
* @queryParam created_by integer Filter by exact user ID who created the user. Example: 1
|
||||
* @queryParam email string Filter by exact email address. Example: jdoe@example.com
|
||||
* @queryParam username string Filter by exact username. Example: jdoe
|
||||
* @queryParam first_name string Filter by exact first name. Example: John
|
||||
* @queryParam last_name string Filter by exact last name. Example: Doe
|
||||
* @queryParam display_name string Filter by exact display name. Example: John Doe
|
||||
* @queryParam employee_num string Filter by exact employee number. Example: 12345
|
||||
* @queryParam state string Filter by exact state. Example: CA
|
||||
* @queryParam country string Filter by exact country. Example: USA
|
||||
* @queryParam website string Filter by exact website URL. Example: https://example.com
|
||||
* @queryParam zip string Filter by exact ZIP code. Example: 90210
|
||||
* @queryParam group_id integer Filter by exact group ID. Example: 1
|
||||
* @queryParam department_id integer Filter by exact department ID. Example: 1
|
||||
* @queryParam manager_id integer Filter by exact manager (user) ID. Example: 1
|
||||
* @queryParam ldap_import integer Filter by exact LDAP import status. Allowed values: 0, 1. Example: 1
|
||||
* @queryParam remote integer Filter by exact remote status. Allowed values: 0, 1. Example: 1
|
||||
* @queryParam vip integer Filter by exact VIP status. Allowed values: 0, 1. Example: 1
|
||||
* @queryParam two_factor_enrolled integer Filter by exact two-factor authentication enrollment status. Allowed values: 0, 1. Example: 1
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
*
|
||||
@@ -103,9 +131,75 @@ class UsersController extends Controller
|
||||
'managedLocations as manages_locations_count'
|
||||
]);
|
||||
|
||||
$allowed_columns =
|
||||
[
|
||||
'last_name',
|
||||
'first_name',
|
||||
'display_name',
|
||||
'email',
|
||||
'jobtitle',
|
||||
'username',
|
||||
'employee_num',
|
||||
'groups',
|
||||
'activated',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'two_factor_enrolled',
|
||||
'two_factor_optin',
|
||||
'last_login',
|
||||
'assets_count',
|
||||
'licenses_count',
|
||||
'consumables_count',
|
||||
'accessories_count',
|
||||
'manages_users_count',
|
||||
'manages_locations_count',
|
||||
'phone',
|
||||
'mobile',
|
||||
'address',
|
||||
'city',
|
||||
'state',
|
||||
'country',
|
||||
'zip',
|
||||
'id',
|
||||
'ldap_import',
|
||||
'two_factor_optin',
|
||||
'two_factor_enrolled',
|
||||
'remote',
|
||||
'vip',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'autoassign_licenses',
|
||||
'website',
|
||||
'locale',
|
||||
'notes',
|
||||
'employee_num',
|
||||
|
||||
if ($request->filled('search') != '') {
|
||||
$users = $users->TextSearch($request->input('search'));
|
||||
// These are *relationships* so we wouldn't normally include them in this array,
|
||||
// since they would normally create a `column not found` error,
|
||||
// BUT we account for them in the ordering switch down at the end of this method
|
||||
// DO NOT ADD ANYTHING TO THIS LIST WITHOUT CHECKING THE ORDERING SWITCH BELOW!
|
||||
'company',
|
||||
'location',
|
||||
'department',
|
||||
'manager',
|
||||
'created_by',
|
||||
|
||||
];
|
||||
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
}
|
||||
|
||||
if ((! is_null($filter)) && (count($filter)) > 0) {
|
||||
$users->ByFilter($filter);
|
||||
} elseif ($request->filled('search')) {
|
||||
$users->TextSearch($request->input('search'));
|
||||
}
|
||||
|
||||
if ($request->filled('activated')) {
|
||||
@@ -286,49 +380,6 @@ class UsersController extends Controller
|
||||
$users->orderBy('first_name', $order);
|
||||
break;
|
||||
default:
|
||||
$allowed_columns =
|
||||
[
|
||||
'last_name',
|
||||
'first_name',
|
||||
'display_name',
|
||||
'email',
|
||||
'jobtitle',
|
||||
'username',
|
||||
'employee_num',
|
||||
'groups',
|
||||
'activated',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'two_factor_enrolled',
|
||||
'two_factor_optin',
|
||||
'last_login',
|
||||
'assets_count',
|
||||
'licenses_count',
|
||||
'consumables_count',
|
||||
'accessories_count',
|
||||
'manages_users_count',
|
||||
'manages_locations_count',
|
||||
'phone',
|
||||
'mobile',
|
||||
'address',
|
||||
'city',
|
||||
'state',
|
||||
'country',
|
||||
'zip',
|
||||
'id',
|
||||
'ldap_import',
|
||||
'two_factor_optin',
|
||||
'two_factor_enrolled',
|
||||
'remote',
|
||||
'vip',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'autoassign_licenses',
|
||||
'website',
|
||||
'locale',
|
||||
'notes',
|
||||
];
|
||||
|
||||
$sort = in_array($request->input('sort'), $allowed_columns) ? $request->input('sort') : 'first_name';
|
||||
$users = $users->orderBy($sort, $order);
|
||||
break;
|
||||
@@ -347,8 +398,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a paginated collection for the select2 menus
|
||||
* Selectlist
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0.16]
|
||||
* @see \App\Http\Transformers\SelectlistTransformer
|
||||
@@ -403,8 +455,9 @@ class UsersController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Create User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -462,8 +515,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
* Show User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @param int $id
|
||||
*/
|
||||
@@ -482,8 +536,9 @@ class UsersController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
* Update User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -583,8 +638,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
* Delete User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @param int $id
|
||||
@@ -620,8 +676,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON containing a list of assets assigned to a user.
|
||||
* List Assets Assigned to User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @param $userId
|
||||
@@ -663,8 +720,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify a specific user via email with all of their assigned assets.
|
||||
* Email Asset List to User
|
||||
*
|
||||
* @group Users
|
||||
* @author [Lukas Fehling] [<lukas.fehling@adabay.rocks>]
|
||||
* @since [v6.0.13]
|
||||
* @param Request $request
|
||||
@@ -692,8 +750,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON containing a list of consumables assigned to a user.
|
||||
* List Consumables Assigned to User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @param $userId
|
||||
@@ -709,8 +768,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON containing a list of accessories assigned to a user.
|
||||
* List Accessories Assigned to User
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.6.14]
|
||||
* @param $userId
|
||||
@@ -727,8 +787,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Return JSON containing a list of licenses assigned to a user.
|
||||
* List Licenses Assigned to User
|
||||
*
|
||||
* @group Users
|
||||
* @author [N. Mathar] [<snipe@snipe.net>]
|
||||
* @since [v5.0]
|
||||
* @param $userId
|
||||
@@ -748,8 +809,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the user's two-factor status
|
||||
* Reset Two-factor
|
||||
*
|
||||
* @group Users
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v3.0]
|
||||
* @param $userId
|
||||
@@ -787,8 +849,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Get info on the current user.
|
||||
* Get Current User Info
|
||||
*
|
||||
* @group Users
|
||||
* @author [Juan Font] [<juanfontalonso@gmail.com>]
|
||||
* @since [v4.4.2]
|
||||
* @param \Illuminate\Http\Request $request
|
||||
@@ -799,8 +862,11 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the EULAs accepted by the user.
|
||||
* User EULAs
|
||||
*
|
||||
* Gets the lst of accepted EULAs for a user,
|
||||
*
|
||||
* @group Users
|
||||
* @param \App\Models\User $user
|
||||
* @param \App\Http\Transformers\ActionlogsTransformer $transformer
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
@@ -818,8 +884,9 @@ class UsersController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a soft-deleted user.
|
||||
* Restore User
|
||||
*
|
||||
* @group Users
|
||||
* @author [E. Taylor] [<dev@evantaylor.name>]
|
||||
* @param int $userId
|
||||
* @since [v6.0.0]
|
||||
@@ -856,8 +923,9 @@ class UsersController extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* Run the LDAP sync command to import users from LDAP via API.
|
||||
* LDAP Sync Users
|
||||
*
|
||||
* @group Users
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @since 8.2.2
|
||||
*
|
||||
|
||||
@@ -363,7 +363,7 @@ class AssetsController extends Controller
|
||||
$asset->purchase_cost = $request->input('purchase_cost', null);
|
||||
$asset->purchase_date = $request->input('purchase_date', null);
|
||||
$asset->next_audit_date = $request->input('next_audit_date', null);
|
||||
if ($request->filled('purchase_date') && !$request->filled('asset_eol_date') && ($asset->model->eol > 0)) {
|
||||
if ($request->filled('purchase_date') && !$request->filled('asset_eol_date') && ($asset->model?->eol > 0)) {
|
||||
$asset->purchase_date = $request->input('purchase_date', null);
|
||||
$asset->asset_eol_date = Carbon::parse($request->input('purchase_date'))->addMonths($asset->model->eol)->format('Y-m-d');
|
||||
$asset->eol_explicit = false;
|
||||
@@ -379,7 +379,7 @@ class AssetsController extends Controller
|
||||
} else {
|
||||
$asset->eol_explicit = true;
|
||||
}
|
||||
} elseif (!$request->filled('asset_eol_date') && (($asset->model->eol) == 0)) {
|
||||
} elseif (!$request->filled('asset_eol_date') && (($asset->model?->eol) == 0)) {
|
||||
$asset->asset_eol_date = null;
|
||||
$asset->eol_explicit = false;
|
||||
}
|
||||
@@ -398,6 +398,7 @@ class AssetsController extends Controller
|
||||
$asset->assigned_to = null;
|
||||
$asset->assigned_type = null;
|
||||
$asset->accepted = null;
|
||||
$asset->last_checkin = now();
|
||||
event(new CheckoutableCheckedIn($asset, $target, auth()->user(), 'Checkin on asset update with '.$status->getStatuslabelType().' status', date('Y-m-d H:i:s'), $originalValues));
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ class BulkAssetsController extends Controller
|
||||
$modelNames = [];
|
||||
|
||||
foreach($models as $model) {
|
||||
$modelNames[] = $model->model->name;
|
||||
$modelNames[] = $model->model?->name;
|
||||
}
|
||||
|
||||
if ($request->filled('bulk_actions')) {
|
||||
@@ -470,7 +470,7 @@ class BulkAssetsController extends Controller
|
||||
*/
|
||||
|
||||
// Does the model have a fieldset?
|
||||
if ($asset->model->fieldset) {
|
||||
if ($asset->model?->fieldset) {
|
||||
foreach ($asset->model->fieldset->fields as $field) {
|
||||
|
||||
// null custom fields
|
||||
@@ -621,9 +621,25 @@ class BulkAssetsController extends Controller
|
||||
{
|
||||
$this->authorize('checkout', Asset::class);
|
||||
|
||||
$alreadyAssigned = collect();
|
||||
|
||||
if (old('selected_assets') && is_array(old('selected_assets'))) {
|
||||
$assets = Asset::findMany(old('selected_assets'));
|
||||
|
||||
[$assignable, $alreadyAssigned] = $assets->partition(function (Asset $asset) {
|
||||
return !$asset->assigned_to;
|
||||
});
|
||||
|
||||
session()->flashInput(['selected_assets' => $assignable->pluck('id')->values()->toArray()]);
|
||||
}
|
||||
|
||||
$do_not_change = ['' => trans('general.do_not_change')];
|
||||
$status_label_list = $do_not_change + Helper::deployableStatusLabelList();
|
||||
return view('hardware/bulk-checkout')->with('statusLabel_list', $status_label_list);
|
||||
|
||||
return view('hardware/bulk-checkout', [
|
||||
'statusLabel_list' => $status_label_list,
|
||||
'removed_assets' => $alreadyAssigned,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -647,6 +663,30 @@ class BulkAssetsController extends Controller
|
||||
|
||||
$assets = Asset::findOrFail($asset_ids);
|
||||
|
||||
// Prevent checking out assets that are already checked out
|
||||
if ($assets->pluck('assigned_to')->unique()->filter()->isNotEmpty()) {
|
||||
// re-add the asset ids so the assets select is re-populated
|
||||
$request->session()->flashInput(['selected_assets' => $asset_ids]);
|
||||
|
||||
return redirect(route('hardware.bulkcheckout.show'))
|
||||
->with('error', trans('general.error_assets_already_checked_out'));
|
||||
}
|
||||
|
||||
// Prevent checking out assets across companies if FMCS enabled
|
||||
if (Setting::getSettings()->full_multiple_companies_support && $target->company_id) {
|
||||
$company_ids = $assets->pluck('company_id')->unique();
|
||||
|
||||
// if there is more than one unique company id or the singular company id does not match
|
||||
// then the checkout is invalid
|
||||
if ($company_ids->count() > 1 || $company_ids->first() != $target->company_id) {
|
||||
// re-add the asset ids so the assets select is re-populated
|
||||
$request->session()->flashInput(['selected_assets' => $asset_ids]);
|
||||
|
||||
return redirect(route('hardware.bulkcheckout.show'))
|
||||
->with('error', trans('general.error_user_company_multiple'));
|
||||
}
|
||||
}
|
||||
|
||||
if (request('checkout_to_type') == 'asset') {
|
||||
foreach ($asset_ids as $asset_id) {
|
||||
if ($target->id == $asset_id) {
|
||||
|
||||
@@ -78,6 +78,7 @@ class MaintenancesController extends Controller
|
||||
$maintenance->is_warranty = $request->input('is_warranty');
|
||||
$maintenance->cost = $request->input('cost');
|
||||
$maintenance->notes = $request->input('notes');
|
||||
$maintenance->url = $request->input('url');
|
||||
|
||||
// Save the asset maintenance data
|
||||
$maintenance->asset_id = $asset->id;
|
||||
@@ -152,6 +153,7 @@ class MaintenancesController extends Controller
|
||||
$maintenance->name = $request->input('name');
|
||||
$maintenance->start_date = $request->input('start_date');
|
||||
$maintenance->completion_date = $request->input('completion_date');
|
||||
$maintenance->url = $request->input('url');
|
||||
|
||||
|
||||
// Todo - put this in a getter/setter?
|
||||
|
||||
@@ -685,6 +685,14 @@ class ReportsController extends Controller
|
||||
$assets->whereBetween('assets.purchase_date', [$request->input('purchase_start'), $request->input('purchase_end')]);
|
||||
}
|
||||
|
||||
if ($request->filled('purchase_cost_start')) {
|
||||
if ($request->filled('purchase_cost_end')) {
|
||||
$assets->whereBetween('assets.purchase_cost', [$request->input('purchase_cost_start'), $request->input('purchase_cost_end')]);
|
||||
} else {
|
||||
$assets->where('assets.purchase_cost', ">", $request->input('purchase_cost_start'));
|
||||
}
|
||||
}
|
||||
|
||||
if (($request->filled('created_start')) && ($request->filled('created_end'))) {
|
||||
$created_start = Carbon::parse($request->input('created_start'))->startOfDay();
|
||||
$created_end = Carbon::parse($request->input('created_end'))->endOfDay();
|
||||
|
||||
@@ -14,6 +14,15 @@ class CustomAssetReportRequest extends Request
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function prepareForValidation()
|
||||
{
|
||||
if($this->filled('purchase_cost_end') && !$this->filled('purchase_cost_start')){
|
||||
$this->merge(['purchase_cost_start' => 0 ]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
@@ -24,6 +33,7 @@ class CustomAssetReportRequest extends Request
|
||||
return [
|
||||
'purchase_start' => 'date|date_format:Y-m-d|nullable',
|
||||
'purchase_end' => 'date|date_format:Y-m-d|nullable',
|
||||
'purchase_cost_end' => 'numeric|nullable|gte:purchase_cost_start',
|
||||
'created_start' => 'date|date_format:Y-m-d|nullable',
|
||||
'created_end' => 'date|date_format:Y-m-d|nullable',
|
||||
'checkout_date_start' => 'date|date_format:Y-m-d|nullable',
|
||||
|
||||
@@ -38,7 +38,7 @@ class StoreAccessoryRequest extends ImageUploadRequest
|
||||
public function rules(): array
|
||||
{
|
||||
return array_merge(
|
||||
['category_type' => 'in:accessory'],
|
||||
['category_type' => 'required|in:accessory'],
|
||||
parent::rules(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class StoreAssetRequest extends ImageUploadRequest
|
||||
|
||||
public function prepareForValidation(): void
|
||||
{
|
||||
parent::prepareForValidation(); // call ImageUploadRequest thing
|
||||
// Guard against users passing in an array for company_id instead of an integer.
|
||||
// If the company_id is not an integer then we simply use what was
|
||||
// provided to be caught by model level validation later.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Traits;
|
||||
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -39,19 +40,12 @@ trait ConvertsBase64ToFiles
|
||||
return;
|
||||
}
|
||||
|
||||
// autogenerate filenames
|
||||
if ($filename == 'auto'){
|
||||
$header = explode(';', $base64Contents, 2)[0];
|
||||
// Grab the image type from the header while we're at it.
|
||||
$filename = $key . '.' . substr($header, strpos($header, '/')+1);
|
||||
}
|
||||
|
||||
// Generate a temporary path to store the Base64 contents
|
||||
$tempFilePath = tempnam(sys_get_temp_dir(), $filename);
|
||||
|
||||
// Store the contents using a stream, or by decoding manually
|
||||
// Store the contents using a stream, or throw an Error (which doesn't do anything?)
|
||||
if (Str::startsWith($base64Contents, 'data:') && count(explode(',', $base64Contents)) > 1) {
|
||||
$source = fopen($base64Contents, 'r');
|
||||
$source = fopen($base64Contents, 'r'); // PHP has special processing for "data:" URL's
|
||||
$destination = fopen($tempFilePath, 'w');
|
||||
|
||||
stream_copy_to_stream($source, $destination);
|
||||
@@ -59,7 +53,8 @@ trait ConvertsBase64ToFiles
|
||||
fclose($source);
|
||||
fclose($destination);
|
||||
} else {
|
||||
file_put_contents($tempFilePath, base64_decode($base64Contents, true));
|
||||
// TODO - to get a better error message here, can we maybe do something with modifying the errorBag?
|
||||
throw new ValidationException("Need Base64 URL starting with 'data:'"); // This doesn't actually throw?
|
||||
}
|
||||
|
||||
$uploadedFile = new UploadedFile($tempFilePath, $filename, null, null, true);
|
||||
|
||||
@@ -36,6 +36,7 @@ class AccessoriesTransformer
|
||||
'qty' => ($accessory->qty) ? (int) $accessory->qty : null,
|
||||
'purchase_date' => ($accessory->purchase_date) ? Helper::getFormattedDateObject($accessory->purchase_date, 'date') : null,
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($accessory->purchase_cost),
|
||||
'total_cost' => Helper::formatCurrencyOutput($accessory->totalCostSum()),
|
||||
'order_number' => ($accessory->order_number) ? e($accessory->order_number) : null,
|
||||
'min_qty' => ($accessory->min_amt) ? (int) $accessory->min_amt : null, // Legacy - should phase out - replaced by below, for the bootstrap table formatter
|
||||
'min_amt' => ($accessory->min_amt) ? (int) $accessory->min_amt : null,
|
||||
|
||||
@@ -147,7 +147,7 @@ class ActionlogsTransformer
|
||||
[
|
||||
'url' => $actionlog->uploads_file_url(),
|
||||
'filename' => $actionlog->filename,
|
||||
'inlineable' => StorageHelper::allowSafeInline($actionlog->uploads_file_url()),
|
||||
'inlineable' => StorageHelper::allowSafeInline($actionlog->uploads_file_path()),
|
||||
'exists_on_disk' => Storage::exists($actionlog->uploads_file_path()) ? true : false,
|
||||
] : null,
|
||||
|
||||
|
||||
@@ -48,12 +48,15 @@ class AssetModelsTransformer
|
||||
'image' => ($assetmodel->image != '') ? Storage::disk('public')->url('models/'.e($assetmodel->image)) : null,
|
||||
'model_number' => ($assetmodel->model_number ? e($assetmodel->model_number): null),
|
||||
'min_amt' => ($assetmodel->min_amt) ? (int) $assetmodel->min_amt : null,
|
||||
'remaining' => (int) ($assetmodel->assets_count - $assetmodel->min_amt),
|
||||
|
||||
'depreciation' => ($assetmodel->depreciation) ? [
|
||||
'id' => (int) $assetmodel->depreciation->id,
|
||||
'name'=> e($assetmodel->depreciation->name),
|
||||
] : null,
|
||||
'assets_count' => (int) $assetmodel->assets_count,
|
||||
'assets_assigned_count' => (int) $assetmodel->assets_assigned_count,
|
||||
'assets_archived_count' => (int) $assetmodel->assets_archived_count,
|
||||
'remaining' => (int) ($assetmodel->assets_count - (int) $assetmodel->assets_assigned_count) - (int) $assetmodel->assets_archived_count,
|
||||
'category' => ($assetmodel->category) ? [
|
||||
'id' => (int) $assetmodel->category->id,
|
||||
'name'=> e($assetmodel->category->name),
|
||||
|
||||
@@ -43,6 +43,7 @@ class ComponentsTransformer
|
||||
'order_number' => e($component->order_number),
|
||||
'purchase_date' => Helper::getFormattedDateObject($component->purchase_date, 'date'),
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($component->purchase_cost),
|
||||
'total_cost' => Helper::formatCurrencyOutput($component->totalCostSum()),
|
||||
'remaining' => (int) $component->numRemaining(),
|
||||
'company' => ($component->company) ? [
|
||||
'id' => (int) $component->company->id,
|
||||
|
||||
@@ -37,6 +37,7 @@ class ConsumablesTransformer
|
||||
'remaining' => $consumable->numRemaining(),
|
||||
'order_number' => e($consumable->order_number),
|
||||
'purchase_cost' => Helper::formatCurrencyOutput($consumable->purchase_cost),
|
||||
'total_cost' => Helper::formatCurrencyOutput($consumable->totalCostSum()),
|
||||
'purchase_date' => Helper::getFormattedDateObject($consumable->purchase_date, 'date'),
|
||||
'qty' => (int) $consumable->qty,
|
||||
'notes' => ($consumable->notes) ? Helper::parseEscapedMarkedownInline($consumable->notes) : null,
|
||||
|
||||
@@ -66,6 +66,7 @@ class MaintenancesTransformer
|
||||
'id' => $assetmaintenance->supplier->id,
|
||||
'name'=> e($assetmaintenance->supplier->name)
|
||||
] : null,
|
||||
'url' => ($assetmaintenance->url) ? e($assetmaintenance->url) : null,
|
||||
'cost' => Helper::formatCurrencyOutput($assetmaintenance->cost),
|
||||
'asset_maintenance_type' => e($assetmaintenance->asset_maintenance_type),
|
||||
'start_date' => Helper::getFormattedDateObject($assetmaintenance->start_date, 'date'),
|
||||
|
||||
@@ -357,6 +357,10 @@ class Accessory extends SnipeModel
|
||||
|
||||
$accessory_checkout->limit(1)->delete();
|
||||
}
|
||||
public function totalCostSum() {
|
||||
|
||||
return $this->purchase_cost !== null ? $this->qty * $this->purchase_cost : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* -----------------------------------------------
|
||||
@@ -386,7 +390,91 @@ class Accessory extends SnipeModel
|
||||
* BEGIN QUERY SCOPES
|
||||
* -----------------------------------------------
|
||||
**/
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $filter JSON array of search keys and terms
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
|
||||
public function scopeByFilter($query, $filter)
|
||||
{
|
||||
return $query->where(
|
||||
function ($query) use ($filter) {
|
||||
foreach ($filter as $fieldname => $search_val) {
|
||||
|
||||
if ($fieldname == 'name') {
|
||||
$query->where('accessories.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'notes') {
|
||||
$query->where('accessories.notes', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'model_number') {
|
||||
$query->where('accessories.model_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'order_number') {
|
||||
$query->where('accessories.order_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'purchase_cost') {
|
||||
$query->where('accessories.purchase_cost', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'location') {
|
||||
$query->whereHas(
|
||||
'location', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'manufacturer') {
|
||||
$query->whereHas(
|
||||
'manufacturer', function ($query) use ($search_val) {
|
||||
$query->where('manufacturers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'supplier') {
|
||||
$query->whereHas(
|
||||
'supplier', function ($query) use ($search_val) {
|
||||
$query->where('suppliers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'category') {
|
||||
$query->whereHas(
|
||||
'category', function ($query) use ($search_val) {
|
||||
$query->where('categories.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'company') {
|
||||
$query->whereHas(
|
||||
'company', function ($query) use ($search_val) {
|
||||
$query->where('companies.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope to order on created_by name
|
||||
|
||||
@@ -493,6 +493,10 @@ class Actionlog extends SnipeModel
|
||||
return 'private_uploads/eula-pdfs/'.$this->filename;
|
||||
}
|
||||
|
||||
if ($this->action_type == 'audit') {
|
||||
return 'private_uploads/audits/'.$this->filename;
|
||||
}
|
||||
|
||||
switch ($this->item_type) {
|
||||
case Accessory::class:
|
||||
return 'private_uploads/accessories/'.$this->filename;
|
||||
|
||||
@@ -227,7 +227,6 @@ class Asset extends Depreciable
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function customFieldValidationRules()
|
||||
{
|
||||
|
||||
@@ -266,7 +265,6 @@ class Asset extends Depreciable
|
||||
return parent::save($params);
|
||||
}
|
||||
|
||||
|
||||
public function getDisplayNameAttribute()
|
||||
{
|
||||
return $this->present()->name();
|
||||
@@ -277,21 +275,129 @@ class Asset extends Depreciable
|
||||
*
|
||||
* @return \Carbon\Carbon|null
|
||||
*/
|
||||
public function getWarrantyExpiresAttribute()
|
||||
|
||||
|
||||
protected function warrantyExpires(): Attribute
|
||||
{
|
||||
if (isset($this->attributes['warranty_months']) && isset($this->attributes['purchase_date'])) {
|
||||
if (is_string($this->attributes['purchase_date']) || is_string($this->attributes['purchase_date'])) {
|
||||
$purchase_date = \Carbon\Carbon::parse($this->attributes['purchase_date']);
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => ($attributes['warranty_months'] && $attributes['purchase_date']) ? Carbon::parse($attributes['purchase_date'])->addMonths($attributes['warranty_months']) : null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function warrantyExpiresFormattedDate(): Attribute
|
||||
{
|
||||
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => Helper::getFormattedDateObject($this->warrantyExpires, 'date', false)
|
||||
);
|
||||
}
|
||||
|
||||
protected function warrantyExpiresDiff(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $this->warrantyExpires ? round((Carbon::now()->diffInDays($this->warrantyExpires))) : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
protected function warrantyExpiresDiffForHumans(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $this->warrantyExpires ? Carbon::parse($this->warrantyExpires)->diffForHumans() : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected function lastAuditFormattedDate(): Attribute
|
||||
{
|
||||
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => Helper::getFormattedDateObject($this->last_audit_date, 'datetime', false)
|
||||
);
|
||||
}
|
||||
|
||||
protected function lastAuditDiff(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $this->warrantyExpires ? round((Carbon::now()->diffInDays($this->warrantyExpires))) : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
protected function lastAuditDiffForHumans(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['last_audit_date'] ? Carbon::parse($attributes['last_audit_date'])->diffForHumans() : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
protected function nextAuditFormattedDate(): Attribute
|
||||
{
|
||||
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => Helper::getFormattedDateObject($this->next_audit_date, 'date', false)
|
||||
);
|
||||
}
|
||||
|
||||
protected function nextAuditDiffInDays(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['next_audit_date'] ? Carbon::now()->diffInDays($attributes['next_audit_date']) : null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function nextAuditDiffForHumans(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['next_audit_date'] ? Carbon::parse($attributes['next_audit_date'])->diffForHumans() : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
protected function eolDate(): Attribute
|
||||
{
|
||||
|
||||
return Attribute:: make(
|
||||
get: function(mixed $value, array $attributes) {
|
||||
if ($attributes['asset_eol_date'] && $attributes['eol_explicit'] == '1') {
|
||||
return Carbon::parse($attributes['asset_eol_date']);
|
||||
} elseif ($attributes['purchase_date'] && $this->model && ((int) $this->model->eol > 0)) {
|
||||
return Carbon::parse($attributes['purchase_date'])->addMonths((int) $this->model->eol);
|
||||
} else {
|
||||
$purchase_date = \Carbon\Carbon::instance($this->attributes['purchase_date']);
|
||||
}
|
||||
$purchase_date->setTime(0, 0, 0);
|
||||
|
||||
return $purchase_date->addMonths((int) $this->attributes['warranty_months']);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected function eolFormattedDate(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $this->eolDate ? Helper::getFormattedDateObject($this->eolDate, 'date', false) : null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function eolDiffInDays(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $this->eolDate ? round((Carbon::now()->diffInDays(Carbon::parse($this->eolDate), false, 1))) : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
protected function eolDiffForHumans(): Attribute
|
||||
{
|
||||
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $this->eolDate ? Carbon::parse($this->eolDate)->diffForHumans() : null,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -1775,13 +1881,29 @@ class Asset extends Depreciable
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname =='assigned_to') {
|
||||
if ($fieldname == 'assigned_to') {
|
||||
$query->whereHasMorph(
|
||||
'assignedTo', [User::class], function ($query) use ($search_val) {
|
||||
$query->where(
|
||||
function ($query) use ($search_val) {
|
||||
$query->where('users.first_name', 'LIKE', '%'.$search_val.'%')
|
||||
->orWhere('users.last_name', 'LIKE', '%'.$search_val.'%');
|
||||
->orWhere('users.last_name', 'LIKE', '%'.$search_val.'%')
|
||||
->orWhere('users.username', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
)->orWhereHasMorph(
|
||||
'assignedTo', [Location::class], function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
)->orWhereHasMorph(
|
||||
'assignedTo', [Asset::class], function ($query) use ($search_val) {
|
||||
$query->where(
|
||||
function ($query) use ($search_val) {
|
||||
// Don't use the asset table prefix here because it will pull from the original asset,
|
||||
// not the subselect we're doing here to get the assigned asset
|
||||
$query->where('name', 'LIKE', '%'.$search_val.'%')
|
||||
->orWhere('asset_tag', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1824,51 +1946,44 @@ class Asset extends Depreciable
|
||||
}
|
||||
|
||||
if ($fieldname == 'model') {
|
||||
$query->where(
|
||||
function ($query) use ($search_val) {
|
||||
$query->whereHas(
|
||||
'model', function ($query) use ($search_val) {
|
||||
$query->where('models.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'model_number') {
|
||||
$query->where(
|
||||
function ($query) use ($search_val) {
|
||||
$query->whereHas(
|
||||
'model', function ($query) use ($search_val) {
|
||||
$query->where('models.model_number', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'company') {
|
||||
$query->where(
|
||||
function ($query) use ($search_val) {
|
||||
$query->whereHas(
|
||||
'company', function ($query) use ($search_val) {
|
||||
$query->where('companies.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'supplier') {
|
||||
$query->where(
|
||||
function ($query) use ($search_val) {
|
||||
$query->whereHas(
|
||||
'supplier', function ($query) use ($search_val) {
|
||||
$query->where('suppliers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'status_label') {
|
||||
$query->whereHas(
|
||||
'assetstatus', function ($query) use ($search_val) {
|
||||
$query->where('status_labels.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,22 @@ class AssetModel extends SnipeModel
|
||||
return $this->hasMany(\App\Models\Asset::class, 'model_id');
|
||||
}
|
||||
|
||||
|
||||
public function availableAssets()
|
||||
{
|
||||
return $this->hasMany(\App\Models\Asset::class, 'model_id')->RTD();
|
||||
}
|
||||
|
||||
public function assignedAssets()
|
||||
{
|
||||
return $this->hasMany(\App\Models\Asset::class, 'model_id')->Deployed();
|
||||
}
|
||||
|
||||
public function archivedAssets()
|
||||
{
|
||||
return $this->hasMany(\App\Models\Asset::class, 'model_id')->Archived();
|
||||
}
|
||||
|
||||
/**
|
||||
* Establishes the model -> category relationship
|
||||
*
|
||||
@@ -240,6 +256,57 @@ class AssetModel extends SnipeModel
|
||||
* -----------------------------------------------
|
||||
**/
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $filter JSON array of search keys and terms
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeByFilter($query, $filter)
|
||||
{
|
||||
return $query->where(
|
||||
function ($query) use ($filter) {
|
||||
foreach ($filter as $fieldname => $search_val) {
|
||||
|
||||
if ($fieldname == 'name') {
|
||||
$query->where('models.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'notes') {
|
||||
$query->where('models.notes', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'model_number') {
|
||||
$query->where('models.model_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'category') {
|
||||
$query->whereHas(
|
||||
'category', function ($query) use ($search_val) {
|
||||
$query->where('categories.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'manufacturer') {
|
||||
$query->whereHas(
|
||||
'manufacturer', function ($query) use ($search_val) {
|
||||
$query->where('manufacturers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* scopeInCategory
|
||||
* Get all models that are in the array of category ids
|
||||
|
||||
@@ -290,6 +290,35 @@ class Category extends SnipeModel
|
||||
* -----------------------------------------------
|
||||
**/
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $filter JSON array of search keys and terms
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeByFilter($query, $filter)
|
||||
{
|
||||
return $query->where(
|
||||
function ($query) use ($filter) {
|
||||
foreach ($filter as $fieldname => $search_val) {
|
||||
|
||||
if ($fieldname == 'name') {
|
||||
$query->where('categories.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'category_type') {
|
||||
$query->where('categories.category_type', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope for whether or not the category requires acceptance
|
||||
*
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use TCPDF;
|
||||
|
||||
class CheckoutAcceptance extends Model
|
||||
{
|
||||
@@ -129,7 +132,6 @@ class CheckoutAcceptance extends Model
|
||||
/**
|
||||
* Filter checkout acceptences by the user
|
||||
*
|
||||
* @param Illuminate\Database\Eloquent\Builder $query
|
||||
* @param User $user
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
@@ -141,7 +143,6 @@ class CheckoutAcceptance extends Model
|
||||
/**
|
||||
* Filter to only get pending acceptances
|
||||
*
|
||||
* @param Illuminate\Database\Eloquent\Builder $query
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopePending(Builder $query)
|
||||
@@ -153,4 +154,103 @@ class CheckoutAcceptance extends Model
|
||||
{
|
||||
return $query->whereNull('accepted_at')->whereNotNull('declined_at');
|
||||
}
|
||||
|
||||
protected function displayCheckoutableType(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value) => strtolower(str_replace('App\Models\\', '', $this->checkoutable_type)),
|
||||
);
|
||||
}
|
||||
|
||||
public function generateAcceptancePdf($data, $pdf_filename) {
|
||||
|
||||
// set some language dependent data:
|
||||
$lg = Array();
|
||||
$lg['a_meta_charset'] = 'UTF-8';
|
||||
$lg['w_page'] = 'page';
|
||||
|
||||
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
|
||||
$pdf->setRTL(false);
|
||||
$pdf->setLanguageArray($lg);
|
||||
$pdf->SetFontSubsetting(true);
|
||||
$pdf->SetCreator('Snipe-IT Asset Management System');
|
||||
$pdf->SetAuthor($data['assigned_to']);
|
||||
$pdf->SetTitle('Asset Acceptance: '.$data['item_tag']);
|
||||
$pdf->SetSubject('Asset Acceptance: '.$data['item_tag']);
|
||||
$pdf->SetKeywords('Snipe-IT, assets, acceptance, eula, tos');
|
||||
$pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
$pdf->SetPrintHeader(false);
|
||||
$pdf->SetPrintFooter(false);
|
||||
|
||||
$pdf->AddPage();
|
||||
if ($data['logo'] != null) {
|
||||
$pdf->writeHTML('<img src="@'.$data['logo'].'">', true, 0, true, 0, '');
|
||||
} else {
|
||||
$pdf->writeHTML('<h3>'.$data['site_name'].'</h3><br /><br />', true, 0, true, 0, 'C');
|
||||
}
|
||||
|
||||
$pdf->Ln();
|
||||
$pdf->writeHTML(trans('general.date') . ': ' . Helper::getFormattedDateObject(now(), 'datetime', false), true, 0, true, 0, '');
|
||||
|
||||
if ($data['company_name'] != null) {
|
||||
$pdf->writeHTML(trans('general.company') . ': ' . e($data['company_name']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_tag'] != null) {
|
||||
$pdf->writeHTML(trans('general.asset_tag') . ': ' . e($data['item_tag']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_name'] != null) {
|
||||
$pdf->writeHTML(trans('general.name') . ': ' . e($data['item_name']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_model'] != null) {
|
||||
$pdf->writeHTML(trans('general.asset_model') . ': ' . e($data['item_model']), true, 0, true, 0, '');
|
||||
}
|
||||
if ($data['item_serial'] != null) {
|
||||
$pdf->writeHTML(trans('admin/hardware/form.serial').': '.e($data['item_serial']), true, 0, true, 0, '');
|
||||
}
|
||||
if (($data['qty'] != null) && ($data['qty'] > 1)) {
|
||||
$pdf->writeHTML(trans('general.qty').': '.e($data['qty']), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->writeHTML(trans('general.assignee').': '.e($data['assigned_to']) . ($data['employee_num'] ? ' ('.$data['employee_num'].')' : ''), true, 0, true, 0, '');
|
||||
if ($data['email'] != null) {
|
||||
$pdf->writeHTML(trans('general.email').': '.e($data['email']), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->Ln();
|
||||
$pdf->writeHTML('<hr>', true, 0, true, 0, '');
|
||||
|
||||
|
||||
// Break the EULA into lines based on newlines, and check each line for RTL or CJK characters
|
||||
$eula_lines = preg_split("/\r\n|\n|\r/", $data['eula']);
|
||||
|
||||
foreach ($eula_lines as $eula_line) {
|
||||
Helper::hasRtl($eula_line) ? $pdf->setRTL(true) : $pdf->setRTL(false);
|
||||
Helper::isCjk($eula_line) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
|
||||
$pdf->writeHTML(Helper::parseEscapedMarkedown($eula_line), true, 0, true, 0, '');
|
||||
}
|
||||
$pdf->Ln();
|
||||
$pdf->Ln();
|
||||
$pdf->setRTL(false);
|
||||
$pdf->Ln();
|
||||
|
||||
if ($data['signature'] != null) {
|
||||
$pdf->writeHTML('<img src="@'.$data['signature'].'">', true, 0, true, 0, '');
|
||||
$pdf->writeHTML('<hr>', true, 0, true, 0, '');
|
||||
$pdf->writeHTML(e($data['assigned_to']), true, 0, true, 0, 'C');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
if ($data['note'] != null) {
|
||||
Helper::isCjk($data['note']) ? $pdf->SetFont('cid0cs', '', 9) : $pdf->SetFont('dejavusans', '', 8, '', true);
|
||||
$pdf->writeHTML(trans('general.notes') . ': ' . e($data['note']), true, 0, true, 0, '');
|
||||
$pdf->Ln();
|
||||
}
|
||||
|
||||
|
||||
$pdf->writeHTML(trans('general.assigned_date').': '.e($data['check_out_date']), true, 0, true, 0, '');
|
||||
$pdf->writeHTML(trans('general.accepted_date').': '.e($data['accepted_date']), true, 0, true, 0, '');
|
||||
|
||||
return $pdf->Output($pdf_filename, 'S');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +288,10 @@ class Component extends SnipeModel
|
||||
return $this->qty - $this->numCheckedOut();
|
||||
}
|
||||
|
||||
public function totalCostSum() {
|
||||
|
||||
return $this->purchase_cost !== null ? $this->qty * $this->purchase_cost : null;
|
||||
}
|
||||
/**
|
||||
* -----------------------------------------------
|
||||
* BEGIN MUTATORS
|
||||
@@ -318,6 +321,97 @@ class Component extends SnipeModel
|
||||
* -----------------------------------------------
|
||||
**/
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $filter JSON array of search keys and terms
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeByFilter($query, $filter)
|
||||
{
|
||||
return $query->where(
|
||||
function ($query) use ($filter) {
|
||||
foreach ($filter as $fieldname => $search_val) {
|
||||
|
||||
if ($fieldname == 'name') {
|
||||
$query->where('components.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'notes') {
|
||||
$query->where('components.notes', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'model_number') {
|
||||
$query->where('components.model_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'order_number') {
|
||||
$query->where('components.order_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'serial') {
|
||||
$query->where('components.serial', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'serial') {
|
||||
$query->where('components.serial', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'purchase_cost') {
|
||||
$query->where('components.purchase_cost', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'location') {
|
||||
$query->whereHas(
|
||||
'location', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'manufacturer') {
|
||||
$query->whereHas(
|
||||
'manufacturer', function ($query) use ($search_val) {
|
||||
$query->where('manufacturers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'supplier') {
|
||||
$query->whereHas(
|
||||
'supplier', function ($query) use ($search_val) {
|
||||
$query->where('suppliers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'category') {
|
||||
$query->whereHas(
|
||||
'category', function ($query) use ($search_val) {
|
||||
$query->where('categories.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'company') {
|
||||
$query->whereHas(
|
||||
'company', function ($query) use ($search_val) {
|
||||
$query->where('companies.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope to order on company
|
||||
|
||||
@@ -312,7 +312,10 @@ class Consumable extends SnipeModel
|
||||
|
||||
return $remaining;
|
||||
}
|
||||
public function totalCostSum() {
|
||||
|
||||
return $this->purchase_cost !== null ? $this->qty * $this->purchase_cost : null;
|
||||
}
|
||||
/**
|
||||
* -----------------------------------------------
|
||||
* BEGIN MUTATORS
|
||||
@@ -342,6 +345,99 @@ class Consumable extends SnipeModel
|
||||
* -----------------------------------------------
|
||||
**/
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $filter JSON array of search keys and terms
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeByFilter($query, $filter)
|
||||
{
|
||||
return $query->where(
|
||||
function ($query) use ($filter) {
|
||||
foreach ($filter as $fieldname => $search_val) {
|
||||
|
||||
if ($fieldname == 'name') {
|
||||
$query->where('consumables.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'notes') {
|
||||
$query->where('consumables.notes', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'model_number') {
|
||||
$query->where('consumables.model_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'order_number') {
|
||||
$query->where('consumables.order_number', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'item_no') {
|
||||
$query->where('consumables.item_no', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'serial') {
|
||||
$query->where('consumables.serial', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'purchase_cost') {
|
||||
$query->where('consumables.purchase_cost', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'location') {
|
||||
$query->whereHas(
|
||||
'location', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'manufacturer') {
|
||||
$query->whereHas(
|
||||
'manufacturer', function ($query) use ($search_val) {
|
||||
$query->where('manufacturers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'supplier') {
|
||||
$query->whereHas(
|
||||
'supplier', function ($query) use ($search_val) {
|
||||
$query->where('suppliers.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ($fieldname == 'category') {
|
||||
$query->whereHas(
|
||||
'category', function ($query) use ($search_val) {
|
||||
$query->where('categories.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'company') {
|
||||
$query->whereHas(
|
||||
'company', function ($query) use ($search_val) {
|
||||
$query->where('companies.name', 'LIKE', '%'.$search_val.'%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope to order on company
|
||||
*
|
||||
|
||||
107
app/Models/Labels/Tapes/Brother/TZe_24mm_E.php
Normal file
107
app/Models/Labels/Tapes/Brother/TZe_24mm_E.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Labels\Tapes\Brother;
|
||||
|
||||
class TZe_24mm_E extends TZe_24mm
|
||||
{
|
||||
private const BARCODE_MARGIN = 1.50;
|
||||
private const TAG_SIZE = 2.00;
|
||||
private const TITLE_SIZE = 2.80;
|
||||
private const TITLE_MARGIN = 0.50;
|
||||
private const LABEL_SIZE = 2.00;
|
||||
private const LABEL_MARGIN = - 0.35;
|
||||
private const FIELD_SIZE = 2.80;
|
||||
private const FIELD_MARGIN = 0.15;
|
||||
private const BARCODE1D_SIZE = - 1.00;
|
||||
|
||||
public function getUnit() { return 'mm'; }
|
||||
public function getWidth() { return 45.0; }
|
||||
public function getHeight() { return 15; }
|
||||
public function getSupportAssetTag() { return true; }
|
||||
public function getSupport1DBarcode() { return true; }
|
||||
public function getSupport2DBarcode() { return true; }
|
||||
public function getSupportFields() { return 3; }
|
||||
public function getSupportLogo() { return false; }
|
||||
public function getSupportTitle() { return true; }
|
||||
|
||||
public function preparePDF($pdf) {}
|
||||
|
||||
public function write($pdf, $record) {
|
||||
$pa = $this->getPrintableArea();
|
||||
|
||||
$currentX = $pa->x1;
|
||||
$currentY = $pa->y1;
|
||||
$usableWidth = $pa->w;
|
||||
|
||||
|
||||
$usableHeight = $pa->h - self::BARCODE1D_SIZE;
|
||||
$barcodeSize = $usableHeight - self::TAG_SIZE;
|
||||
|
||||
if ($record->has('barcode2d')) {
|
||||
static::writeText(
|
||||
$pdf, $record->get('tag'),
|
||||
$pa->x1, $pa->y2 - self::TAG_SIZE - self::BARCODE1D_SIZE,
|
||||
'freesans', 'b', self::TAG_SIZE, 'C',
|
||||
$barcodeSize, self::TAG_SIZE, true, 0
|
||||
);
|
||||
static::write2DBarcode(
|
||||
$pdf, $record->get('barcode2d')->content, $record->get('barcode2d')->type,
|
||||
$currentX, $currentY,
|
||||
$barcodeSize, $barcodeSize
|
||||
);
|
||||
$currentX += $barcodeSize + self::BARCODE_MARGIN;
|
||||
$usableWidth -= $barcodeSize + self::BARCODE_MARGIN;
|
||||
} else {
|
||||
static::writeText(
|
||||
$pdf, $record->get('tag'),
|
||||
$pa->x1, $pa->y2 - self::TAG_SIZE - self::BARCODE1D_SIZE,
|
||||
'freesans', 'B', self::TAG_SIZE, 'R',
|
||||
$usableWidth, self::TAG_SIZE, true, 0
|
||||
);
|
||||
}
|
||||
|
||||
if ($record->has('title')) {
|
||||
static::writeText(
|
||||
$pdf, $record->get('title'),
|
||||
$currentX, $currentY,
|
||||
'freesans', 'B', self::TITLE_SIZE, 'L',
|
||||
$usableWidth, self::TITLE_SIZE, true, 0
|
||||
);
|
||||
$currentY += self::TITLE_SIZE + self::TITLE_MARGIN;
|
||||
}
|
||||
|
||||
foreach ($record->get('fields') as $field) {
|
||||
// Write label and value on the same line
|
||||
// Calculate label width with proportional character spacing
|
||||
$labelWidth = $pdf->GetStringWidth($field['label'], 'freesans', '', self::LABEL_SIZE);
|
||||
$charCount = strlen($field['label']);
|
||||
$spacingPerChar = 0.5;
|
||||
$totalSpacing = $charCount * $spacingPerChar;
|
||||
$adjustedWidth = $labelWidth + $totalSpacing;
|
||||
|
||||
static::writeText(
|
||||
$pdf, $field['label'],
|
||||
$currentX, $currentY,
|
||||
'freesans', 'B', self::LABEL_SIZE, 'L',
|
||||
$adjustedWidth, self::LABEL_SIZE, true, 0, $spacingPerChar
|
||||
);
|
||||
|
||||
static::writeText(
|
||||
$pdf, $field['value'],
|
||||
$currentX + $adjustedWidth + 2, $currentY,
|
||||
'freesans', 'B', self::FIELD_SIZE, 'L',
|
||||
$usableWidth - $adjustedWidth - 2, self::FIELD_SIZE, true, 0, 0.3
|
||||
);
|
||||
|
||||
$currentY += max(self::LABEL_SIZE, self::FIELD_SIZE) + self::FIELD_MARGIN;
|
||||
}
|
||||
|
||||
|
||||
if ($record->has('barcode1d')) {
|
||||
static::write1DBarcode(
|
||||
$pdf, $record->get('barcode1d')->content, $record->get('barcode1d')->type,
|
||||
$currentX, $barcodeSize + self::BARCODE_MARGIN, $usableWidth - self::TAG_SIZE, self::TAG_SIZE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ use App\Models\Traits\HasUploads;
|
||||
use App\Models\Traits\Searchable;
|
||||
use App\Presenters\Presentable;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -156,6 +157,29 @@ class License extends Depreciable
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
protected function terminatesFormattedDate(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['termination_date'] ? Helper::getFormattedDateObject($attributes['termination_date'], 'date', false) : null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function terminatesDiffInDays(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['termination_date'] ? Carbon::now()->diffInDays($attributes['termination_date']) : null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function terminatesDiffForHumans(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['termination_date'] ? Carbon::parse($attributes['termination_date'])->diffForHumans() : null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function prepareLimitChangeRule($parameters, $field)
|
||||
{
|
||||
$actual_seat_count = $this->licenseseats()->count(); //we use the *actual* seat count here, in case your license has gone wonky
|
||||
@@ -706,8 +730,41 @@ class License extends Depreciable
|
||||
return $this->hasMany(\App\Models\LicenseSeat::class)->whereNull('assigned_to')->whereNull('deleted_at')->whereNull('asset_id');
|
||||
}
|
||||
|
||||
public function scopeActiveLicenses($query)
|
||||
{
|
||||
|
||||
return $query->whereNull('licenses.deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
->where(function ($query) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereDate('termination_date', '>', [Carbon::now()]);
|
||||
})
|
||||
->where(function ($query) {
|
||||
$query->whereNull('expiration_date')
|
||||
->orWhereDate('expiration_date', '>', [Carbon::now()]);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns expiring licenses.
|
||||
* Expiried/terminated licenses scope
|
||||
*
|
||||
* @author A. Gianotto <snipe@snipe.net>
|
||||
* @since [v1.0]
|
||||
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
||||
* @see \App\Console\Commands\SendExpiringLicenseNotifications
|
||||
*/
|
||||
public function scopeExpiredLicenses($query)
|
||||
{
|
||||
return $query->whereDate('termination_date', '<=', Carbon::now())// The termination date is null or within range
|
||||
->orWhere(function ($query) {
|
||||
$query->whereDate('expiration_date', '<=', Carbon::now());
|
||||
})
|
||||
->whereNull('licenses.deleted_at');
|
||||
}
|
||||
|
||||
/**
|
||||
* Expiring/terminating licenses scope
|
||||
*
|
||||
* This checks if:
|
||||
*
|
||||
@@ -721,63 +778,25 @@ class License extends Depreciable
|
||||
* @return \Illuminate\Database\Eloquent\Relations\Relation
|
||||
* @see \App\Console\Commands\SendExpiringLicenseNotifications
|
||||
*/
|
||||
public static function getExpiringLicenses($days = 60)
|
||||
public function scopeExpiringLicenses($query, $days = 60)
|
||||
{
|
||||
|
||||
return self::whereNull('deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
return $query// The termination date is null or within range
|
||||
->where(function ($query) use ($days) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereBetween('termination_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
})
|
||||
->where(function ($query) use ($days) {
|
||||
$query->whereNotNull('expiration_date')
|
||||
// Handle expired licenses without termination dates
|
||||
// Handle expiring licenses without termination dates
|
||||
->where(function ($query) use ($days) {
|
||||
$query->whereNull('termination_date')
|
||||
->whereBetween('expiration_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
})
|
||||
|
||||
// Handle expired licenses with termination dates in the future
|
||||
// Handle expiring licenses with termination dates in the future
|
||||
->orWhere(function ($query) use ($days) {
|
||||
$query->whereBetween('termination_date', [Carbon::now(), Carbon::now()->addDays($days)]);
|
||||
});
|
||||
})
|
||||
->orderBy('expiration_date', 'ASC')
|
||||
->orderBy('termination_date', 'ASC')
|
||||
->get();
|
||||
}
|
||||
|
||||
public function scopeActiveLicenses($query)
|
||||
{
|
||||
|
||||
return $query->whereNull('deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
->where(function ($query) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereDate('termination_date', '>', [Carbon::now()]);
|
||||
})
|
||||
->where(function ($query) {
|
||||
$query->whereNull('expiration_date')
|
||||
->orWhereDate('expiration_date', '>', [Carbon::now()]);
|
||||
});
|
||||
}
|
||||
|
||||
public function scopeExpiredLicenses($query)
|
||||
{
|
||||
|
||||
return $query->whereNull('deleted_at')
|
||||
|
||||
// The termination date is null or within range
|
||||
->where(function ($query) {
|
||||
$query->whereNull('termination_date')
|
||||
->orWhereDate('termination_date', '<=', [Carbon::now()]);
|
||||
})
|
||||
->orWhere(function ($query) {
|
||||
$query->whereNull('expiration_date')
|
||||
->orWhereDate('expiration_date', '<=', [Carbon::now()]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Models\Traits\CompanyableChildTrait;
|
||||
use App\Notifications\CheckinLicenseNotification;
|
||||
use App\Notifications\CheckoutLicenseNotification;
|
||||
use App\Presenters\Presentable;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
@@ -64,6 +65,21 @@ class LicenseSeat extends SnipeModel implements ICompanyableChild
|
||||
return $this->license->getEula();
|
||||
}
|
||||
|
||||
protected function name(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value) => $this->license->name,
|
||||
);
|
||||
}
|
||||
|
||||
protected function displayName(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value) => $this->license->name,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Establishes the seat -> license relationship
|
||||
*
|
||||
|
||||
@@ -38,6 +38,7 @@ class Maintenance extends SnipeModel implements ICompanyableChild
|
||||
'completion_date' => 'date_format:Y-m-d|nullable|after_or_equal:start_date',
|
||||
'notes' => 'string|nullable',
|
||||
'cost' => 'numeric|nullable|gte:0|max:99999999999999999.99',
|
||||
'url' => 'nullable|url|max:255',
|
||||
];
|
||||
|
||||
|
||||
@@ -57,6 +58,7 @@ class Maintenance extends SnipeModel implements ICompanyableChild
|
||||
'asset_maintenance_time',
|
||||
'notes',
|
||||
'cost',
|
||||
'url',
|
||||
];
|
||||
|
||||
use Searchable;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Models;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -19,6 +20,37 @@ class SnipeModel extends Model
|
||||
$this->attributes['purchase_date'] = $value;
|
||||
}
|
||||
|
||||
|
||||
protected function purchaseDateFormatted(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => $attributes['purchase_date'] ? Helper::getFormattedDateObject(Carbon::parse($attributes['purchase_date']), 'date', false) : null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
protected function expiresDiffInDays(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => in_array('expiration_date', $attributes) ? Carbon::now()->diffInDays($attributes['expiration_date']) : null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
protected function expiresDiffForHumans(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => in_array('expiration_date', $attributes) ? Carbon::parse($attributes['expiration_date'])->diffForHumans() : null,
|
||||
);
|
||||
}
|
||||
|
||||
protected function expiresFormattedDate(): Attribute
|
||||
{
|
||||
return Attribute:: make(
|
||||
get: fn(mixed $value, array $attributes) => in_array('expiration_date', $attributes) ? Helper::getFormattedDateObject($attributes['expiration_date'], 'date', false) : null,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
*/
|
||||
@@ -180,6 +212,7 @@ class SnipeModel extends Model
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public function getEula()
|
||||
{
|
||||
|
||||
|
||||
@@ -863,6 +863,141 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
|
||||
return new \stdClass;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Query builder scope to search on text filters for complex Bootstrap Tables API
|
||||
*
|
||||
* @param \Illuminate\Database\Query\Builder $query Query builder instance
|
||||
* @param text $filter JSON array of search keys and terms
|
||||
*
|
||||
* @return \Illuminate\Database\Query\Builder Modified query builder
|
||||
*/
|
||||
public function scopeByFilter($query, $filter)
|
||||
{
|
||||
return $query->where(
|
||||
function ($query) use ($filter) {
|
||||
foreach ($filter as $fieldname => $search_val) {
|
||||
|
||||
if ($fieldname == 'first_name') {
|
||||
$query->where('users.first_name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
if ($fieldname == 'last_name') {
|
||||
$query->where('users.last_name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'display_name') {
|
||||
$query->where('users.display_name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'name') {
|
||||
$query->where('users.last_name', 'LIKE', '%' . $search_val . '%')
|
||||
->orWhere('users.first_name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'username') {
|
||||
$query->where('users.username', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'email') {
|
||||
$query->where('users.email', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'phone') {
|
||||
$query->where('users.phone', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'mobile') {
|
||||
$query->where('users.mobile', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'phone') {
|
||||
$query->where('users.phone', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'jobtitle') {
|
||||
$query->where('users.jobtitle', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'created_at') {
|
||||
$query->where('users.created_at', '=', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'updated_at') {
|
||||
$query->where('users.updated_at', '=', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'start_date') {
|
||||
$query->where('users.start_date', '=', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'end_date') {
|
||||
$query->where('users.end_date', '=', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'employee_num') {
|
||||
$query->where('users.employee_num', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'locale') {
|
||||
$query->where('users.locale', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'address') {
|
||||
$query->where('users.address', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'state') {
|
||||
$query->where('users.state', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'zip') {
|
||||
$query->where('users.zip', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'country') {
|
||||
$query->where('users.country', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'vip') {
|
||||
$query->where('users.vip', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'remote') {
|
||||
$query->where('users.remote', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'start_date') {
|
||||
$query->where('users.purchase_date', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'notes') {
|
||||
$query->where('users.notes', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
|
||||
if ($fieldname == 'location') {
|
||||
$query->whereHas(
|
||||
'location', function ($query) use ($search_val) {
|
||||
$query->where('locations.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ($fieldname == 'company') {
|
||||
$query->whereHas(
|
||||
'company', function ($query) use ($search_val) {
|
||||
$query->where('companies.name', 'LIKE', '%' . $search_val . '%');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query builder scope to search user by name with spaces in it.
|
||||
* We don't use the advancedTextSearch() scope because that searches
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use AllowDynamicProperties;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
@@ -10,7 +11,7 @@ use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class AcceptanceAssetAcceptedNotification extends Notification
|
||||
#[AllowDynamicProperties] class AcceptanceAssetAcceptedNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
@@ -22,16 +23,18 @@ class AcceptanceAssetAcceptedNotification extends Notification
|
||||
public function __construct($params)
|
||||
{
|
||||
$this->item_tag = $params['item_tag'];
|
||||
$this->item_name = $params['item_name'];
|
||||
$this->item_model = $params['item_model'];
|
||||
$this->item_serial = $params['item_serial'];
|
||||
$this->item_status = $params['item_status'];
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false);
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'datetime', false);
|
||||
$this->assigned_to = $params['assigned_to'];
|
||||
$this->note = $params['note'];
|
||||
$this->company_name = $params['company_name'];
|
||||
$this->admin = $params['admin'] ?? null;
|
||||
$this->settings = Setting::getSettings();
|
||||
$this->file = $params['file'] ?? null;
|
||||
$this->qty = $params['qty'] ?? null;
|
||||
$this->note = $params['note'] ?? null;
|
||||
$this->admin = $params['admin'] ?? null;
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +69,7 @@ class AcceptanceAssetAcceptedNotification extends Notification
|
||||
$message = (new MailMessage)->markdown('notifications.markdown.asset-acceptance',
|
||||
[
|
||||
'item_tag' => $this->item_tag,
|
||||
'item_name' => $this->item_name,
|
||||
'item_model' => $this->item_model,
|
||||
'item_serial' => $this->item_serial,
|
||||
'item_status' => $this->item_status,
|
||||
@@ -73,9 +77,9 @@ class AcceptanceAssetAcceptedNotification extends Notification
|
||||
'accepted_date' => $this->accepted_date,
|
||||
'assigned_to' => $this->assigned_to,
|
||||
'company_name' => $this->company_name,
|
||||
'admin' => $this->admin,
|
||||
'qty' => $this->qty,
|
||||
'intro_text' => trans('mail.acceptance_asset_accepted'),
|
||||
'admin' => $this->admin,
|
||||
])
|
||||
->subject(trans('mail.acceptance_asset_accepted'));
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use AllowDynamicProperties;
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
#[AllowDynamicProperties] class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
@@ -20,16 +21,18 @@ class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
public function __construct($params)
|
||||
{
|
||||
$this->item_tag = $params['item_tag'];
|
||||
$this->item_name = $params['item_name'];
|
||||
$this->item_model = $params['item_model'];
|
||||
$this->item_serial = $params['item_serial'];
|
||||
$this->item_status = $params['item_status'];
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'date', false);
|
||||
$this->accepted_date = Helper::getFormattedDateObject($params['accepted_date'], 'datetime', false);
|
||||
$this->assigned_to = $params['assigned_to'];
|
||||
$this->note = $params['note'];
|
||||
$this->note = $params['note'] ?? null;
|
||||
$this->company_name = $params['company_name'];
|
||||
$this->settings = Setting::getSettings();
|
||||
$this->file = $params['file'] ?? null;
|
||||
$this->qty = $params['qty'] ?? null;
|
||||
$this->admin = $params['admin'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,6 +62,7 @@ class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
$message = (new MailMessage)->markdown('notifications.markdown.asset-acceptance',
|
||||
[
|
||||
'item_tag' => $this->item_tag,
|
||||
'item_name' => $this->item_name,
|
||||
'item_model' => $this->item_model,
|
||||
'item_serial' => $this->item_serial,
|
||||
'item_status' => $this->item_status,
|
||||
@@ -66,11 +70,12 @@ class AcceptanceAssetAcceptedToUserNotification extends Notification
|
||||
'accepted_date' => $this->accepted_date,
|
||||
'assigned_to' => $this->assigned_to,
|
||||
'company_name' => $this->company_name,
|
||||
'admin' => $this->admin,
|
||||
'qty' => $this->qty,
|
||||
'intro_text' => trans('mail.acceptance_asset_accepted_to_user', ['site_name' => $this->company_name ?? $this->settings->site_name]),
|
||||
'intro_text' => trans_choice('mail.acceptance_asset_accepted_to_user', $this->qty, ['qty' => $this->qty, 'site_name' => $this->settings->site_name]),
|
||||
])
|
||||
->attach($pdf_path)
|
||||
->subject(trans('mail.acceptance_asset_accepted_to_user', ['site_name' => $this->settings->site_name]));
|
||||
->subject(trans_choice('mail.acceptance_asset_accepted_to_user', $this->qty, ['qty' => $this->qty, 'site_name' => $this->settings->site_name]));
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
@@ -168,14 +168,14 @@ class AssetObserver
|
||||
public function saving(Asset $asset)
|
||||
{
|
||||
// determine if calculated eol and then calculate it - this should only happen on a new asset
|
||||
if (is_null($asset->asset_eol_date) && !is_null($asset->purchase_date) && ($asset->model->eol > 0)){
|
||||
if (is_null($asset->asset_eol_date) && !is_null($asset->purchase_date) && ($asset->model?->eol > 0)) {
|
||||
$asset->asset_eol_date = $asset->purchase_date->addMonths($asset->model->eol)->format('Y-m-d');
|
||||
$asset->eol_explicit = false;
|
||||
}
|
||||
|
||||
// determine if explicit and set eol_explicit to true
|
||||
if (!is_null($asset->asset_eol_date) && !is_null($asset->purchase_date)) {
|
||||
if($asset->model->eol > 0) {
|
||||
if ($asset->model?->eol > 0) {
|
||||
$months = (int) Carbon::parse($asset->asset_eol_date)->diffInMonths($asset->purchase_date, true);
|
||||
if($months != $asset->model->eol) {
|
||||
$asset->eol_explicit = true;
|
||||
@@ -184,9 +184,9 @@ class AssetObserver
|
||||
} elseif (!is_null($asset->asset_eol_date) && is_null($asset->purchase_date)) {
|
||||
$asset->eol_explicit = true;
|
||||
}
|
||||
if ((!is_null($asset->asset_eol_date)) && (!is_null($asset->purchase_date)) && (is_null($asset->model->eol) || ($asset->model->eol == 0))) {
|
||||
|
||||
if ((!is_null($asset->asset_eol_date)) && (!is_null($asset->purchase_date)) && (is_null($asset->model?->eol) || ($asset->model?->eol == 0))) {
|
||||
$asset->eol_explicit = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,12 @@ class AccessoryPresenter extends Presenter
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.unit_cost'),
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
'field' => 'total_cost',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.total_cost'),
|
||||
'footerFormatter' => 'sumFormatterQuantity',
|
||||
'class' => 'text-right text-padding-number-cell',
|
||||
], [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user