File tree Expand file tree Collapse file tree 13 files changed +336
-2
lines changed
Expand file tree Collapse file tree 13 files changed +336
-2
lines changed Original file line number Diff line number Diff line change 1+ meta {
2+ name : API login
3+ type : http
4+ seq : 1
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/apilogin
9+ body : multipartForm
10+ auth : none
11+ }
12+
13+ body:multipart-form {
14+ username : {{assetsUsername}}
15+ password : {{assetsPassword}}
16+ clientId : {{assetsClientId}}
17+ }
18+
19+ assert {
20+ res.status : eq 200
21+ res.body : isJson
22+ }
23+
24+ script:post-response {
25+ bru .setEnvVar (" assetsAuthToken" , res .body .authToken );
26+ }
27+
28+ settings {
29+ encodeUrl: true
30+ timeout: 0
31+ }
32+
33+ docs {
34+ WoodWing Helpcenter: [ Assets Server REST API - API login] ( https://helpcenter.woodwing.com/hc/en-us/articles/360041851192-Assets-Server-REST-API-API-login )
35+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Add to collection
3+ type : http
4+ seq : 6
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/createRelation
9+ body : multipartForm
10+ auth : inherit
11+ }
12+
13+ body:multipart-form {
14+ relationType : contains
15+ target1Id : {{tempTestCollectionId}}
16+ target2Id : {{tempTestAssetId}}
17+ }
18+
19+ assert {
20+ res.status : eq 200
21+ }
22+
23+ settings {
24+ encodeUrl: true
25+ timeout: 0
26+ }
27+
28+ docs {
29+ WoodWing Helpcenter: [ Assets Server REST API - create relation] ( https://helpcenter.woodwing.com/hc/en-us/articles/360042268751-Assets-Server-REST-API-create-relation )
30+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Create asset
3+ type : http
4+ seq : 4
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/create
9+ body : multipartForm
10+ auth : inherit
11+ }
12+
13+ body:multipart-form {
14+ metadataToReturn : assetPath
15+ folderPath : {{tempTestFolder}}
16+ name : Test-Asset
17+ }
18+
19+ assert {
20+ res.status : eq 200
21+ res.body : isJson
22+ res.body.id : isNotEmpty
23+ }
24+
25+ script:post-response {
26+ bru .setEnvVar (" tempTestAssetId" , res .body .id );
27+ }
28+
29+ settings {
30+ encodeUrl: true
31+ timeout: 0
32+ }
33+
34+ docs {
35+ WoodWing Helpcenter: [ Assets Server REST API - create] ( https://helpcenter.woodwing.com/hc/en-us/articles/360042268771-Assets-Server-REST-API-create )
36+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Create collection
3+ type : http
4+ seq : 5
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/create
9+ body : multipartForm
10+ auth : inherit
11+ }
12+
13+ body:multipart-form {
14+ metadataToReturn : assetPath
15+ folderPath : {{tempTestFolder}}
16+ title : Test Collection from Bruno Test Suite
17+ filename : Test.collection
18+ }
19+
20+ assert {
21+ res.status : eq 200
22+ res.body : isJson
23+ res.body.id : isNotEmpty
24+ }
25+
26+ script:post-response {
27+ bru .setEnvVar (" tempTestCollectionId" , res .body .id );
28+ }
29+
30+ settings {
31+ encodeUrl: true
32+ timeout: 0
33+ }
34+
35+ docs {
36+ WoodWing Helpcenter: [ Assets Server REST API - create] ( https://helpcenter.woodwing.com/hc/en-us/articles/360042268771-Assets-Server-REST-API-create )
37+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Create folder
3+ type : http
4+ seq : 3
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/api/folder
9+ body : json
10+ auth : inherit
11+ }
12+
13+ body:json {
14+ {
15+ "path" : " {{tempTestFolder}}"
16+ }
17+ }
18+
19+ assert {
20+ res.status : eq 201
21+ res.body : isJson
22+ res.body.id : isNotEmpty
23+ }
24+
25+ script:post-response {
26+ bru .setEnvVar (" tempTestFolderId" , res .body .id );
27+ }
28+
29+ settings {
30+ encodeUrl: true
31+ timeout: 0
32+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Get collection relation
3+ type : http
4+ seq : 7
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/search
9+ body : multipartForm
10+ auth : inherit
11+ }
12+
13+ body:multipart-form {
14+ q : relatedTo:{{tempTestCollectionId}} relationTarget:child relationType:contains id:{{tempTestAssetId}}
15+ metadataToReturn : assetPath
16+ num : 1
17+ }
18+
19+ assert {
20+ res.status : eq 200
21+ res.body : isJson
22+ res.body.totalHits : eq 1
23+ res.body.hits[0].relation.relationId : isNotEmpty
24+ }
25+
26+ script:post-response {
27+ bru .setEnvVar (" tempTestRelationId" , res .body .hits [0 ].relation .relationId );
28+ }
29+
30+ settings {
31+ encodeUrl: true
32+ timeout: 60000
33+ followRedirects: true
34+ maxRedirects: 5
35+ }
36+
37+ docs {
38+ WoodWing Helpcenter: [ The Assets Server query syntax - Additional queries] ( https://helpcenter.woodwing.com/hc/en-us/articles/360041854172-The-Assets-Server-query-syntax#additional-queries )
39+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Remove asset
3+ type : http
4+ seq : 9
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/remove
9+ body : multipartForm
10+ auth : inherit
11+ }
12+
13+ body:multipart-form {
14+ ids : {{tempTestAssetId}}
15+ }
16+
17+ assert {
18+ res.status : eq 200
19+ res.body : isJson
20+ res.body.processedCount : eq 1
21+ }
22+
23+ settings {
24+ encodeUrl: true
25+ timeout: 0
26+ }
27+
28+ docs {
29+ WoodWing Helpcenter: [ Assets Server REST API - remove] ( https://helpcenter.woodwing.com/hc/en-us/articles/360041851352-Assets-Server-REST-API-remove )
30+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Remove folder
3+ type : http
4+ seq : 10
5+ }
6+
7+ delete {
8+ url : {{assetsUrl}}/api/folder/:id
9+ body : none
10+ auth : inherit
11+ }
12+
13+ params:path {
14+ id: {{tempTestFolderId}}
15+ }
16+
17+ assert {
18+ res.status : eq 200
19+ }
20+
21+ settings {
22+ encodeUrl: true
23+ timeout: 0
24+ }
Original file line number Diff line number Diff line change 1+ meta {
2+ name : Remove from collection
3+ type : http
4+ seq : 8
5+ }
6+
7+ post {
8+ url : {{assetsUrl}}/services/removeRelation
9+ body : multipartForm
10+ auth : inherit
11+ }
12+
13+ body:multipart-form {
14+ relationIds : {{tempTestRelationId}}
15+ }
16+
17+ assert {
18+ res.status : eq 200
19+ res.body : isJson
20+ res.body.processedCount : eq 1
21+ }
22+
23+ settings {
24+ encodeUrl: true
25+ timeout: 0
26+ }
27+
28+ docs {
29+ WoodWing Helpcenter: [ Assets Server REST API - remove relation] ( https://helpcenter.woodwing.com/hc/en-us/articles/360041851332-Assets-Server-REST-API-remove-relation )
30+ }
Original file line number Diff line number Diff line change 1+ {
2+ "version" : " 1" ,
3+ "name" : " Assets Test Suite" ,
4+ "type" : " collection" ,
5+ "ignore" : [
6+ " node_modules" ,
7+ " .git"
8+ ]
9+ }
You can’t perform that action at this time.
0 commit comments