Action Words
This feature is available with Squash Ultimate license.
Get all action words
A GET
to /action-words
returns all the action words the user is allowed to read.
HTTP request
GET /api/rest/latest/action-words?page=1&size=3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1375
{
"_embedded" : {
"action-words" : [ {
"_type" : "action-word",
"id" : 87,
"word" : "I write \"login\" in login",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/87"
}
}
}, {
"_type" : "action-word",
"id" : 88,
"word" : "I write \"password\" in password",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/88"
}
}
}, {
"_type" : "action-word",
"id" : 89,
"word" : "I log in",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/89"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/action-words?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/action-words?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words?page=1&size=3"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/action-words?page=2&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/action-words?page=3&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 1
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get action words of project
A GET
to /projects/{id}/action-words
returns all the action words contained in the given project.
HTTP request
GET /api/rest/latest/projects/14/action-words?page=2&size=3 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1483
{
"_embedded" : {
"action-words" : [ {
"_type" : "action-word",
"id" : 121,
"word" : "I have \"number\" oranges in my basket",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/121"
}
}
}, {
"_type" : "action-word",
"id" : 122,
"word" : "I eat \"number\" oranges",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/122"
}
}
}, {
"_type" : "action-word",
"id" : 124,
"word" : "There are \"number\" oranges left in my basket",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/124"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/action-words?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/action-words?page=1&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/action-words?page=2&size=3"
},
"next" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/action-words?page=3&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14/action-words?page=3&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 10,
"totalPages" : 4,
"number" : 2
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |
Get action word
A GET
to /action-words/{id}
returns the action word with the given id.
HTTP request
GET /api/rest/latest/action-words/721 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1307
{
"_type" : "action-word",
"id" : 721,
"word" : "The color of the icon \"iconName\" is \"color\".",
"description" : "Action word describing the color of an icon.",
"project" : {
"_type" : "project",
"id" : 6,
"name" : "my project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/6"
}
}
},
"created_by" : "Arthur",
"created_on" : "2020-08-15T07:48:02.000+00:00",
"last_modified_by" : "Arthur",
"last_modified_on" : "2020-08-15T07:53:11.000+00:00",
"last_implementation_technology" : "ROBOT",
"last_implementation_date" : "2020-09-06T09:35:47.000+00:00",
"parameters" : [ {
"_type" : "action-word-parameter",
"id" : 3,
"name" : "iconName",
"default_value" : "home"
}, {
"_type" : "action-word-parameter",
"id" : 4,
"name" : "color",
"default_value" : "green"
} ],
"test_cases" : [ {
"_type" : "keyword-test-case",
"id" : 476,
"name" : "User interface icons colors",
"reference" : "UX-17",
"importance" : "MEDIUM",
"status" : "APPROVED"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/721"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/6"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the action word |
|
|
the action itself with its parameters |
|
|
the description of the action word |
|
|
the automation framework used for the last implementation of the action word |
|
|
the date when the action word was last implemented |
|
|
the user who created this action word |
|
|
the date the action word was created |
|
|
the user who last modified the action word |
|
|
the date the action word was last modified |
|
|
the project the action word belongs to |
|
|
the parameters of the action word |
|
|
the test cases which use this action word |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the action word |
|
link to the project of the action word |
Create action word
A POST
to /action-words
creates a new action word.
HTTP request
POST /api/rest/latest/action-words HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 216
Host: localhost:8080
{
"_type" : "action-word",
"word" : "The color of the icon \"iconName\" is \"color\".",
"description" : "Action word describing the number of icons.",
"project" : {
"_type" : "project",
"id" : 6
}
}
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 903
{
"_type" : "action-word",
"id" : 721,
"word" : "The color of the icon \"iconName\" is \"color\".",
"description" : "Action word describing the color of an icon.",
"project" : {
"_type" : "project",
"id" : 6,
"name" : "my project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/6"
}
}
},
"created_by" : "Arthur",
"created_on" : "2020-08-15T07:48:02.000+00:00",
"parameters" : [ {
"_type" : "action-word-parameter",
"id" : 3,
"name" : "iconName",
"default_value" : "home"
}, {
"_type" : "action-word-parameter",
"id" : 4,
"name" : "color",
"default_value" : "green"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/721"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/6"
}
}
}
Modify action word
A PATCH
to /action-words/{id}
modifies the action word with the given id.
HTTP request
PATCH /api/rest/latest/action-words/721 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 94
Host: localhost:8080
{
"_type" : "action-word",
"description" : "Action word describing the number of icons."
}
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1178
{
"_type" : "action-word",
"id" : 721,
"word" : "There are \"iconCount\" displayed.",
"description" : "Action word describing the number of icons.",
"project" : {
"_type" : "project",
"id" : 6,
"name" : "my project",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/projects/6"
}
}
},
"created_by" : "Arthur",
"created_on" : "2020-08-15T07:48:02.000+00:00",
"last_modified_by" : "Arthur",
"last_modified_on" : "2020-09-02T12:36:17.000+00:00",
"last_implementation_technology" : "ROBOT",
"last_implementation_date" : "2020-09-06T09:35:47.000+00:00",
"parameters" : [ {
"_type" : "action-word-parameter",
"id" : 3,
"name" : "iconCount",
"default_value" : "5"
} ],
"test_cases" : [ {
"_type" : "keyword-test-case",
"id" : 476,
"name" : "User interface icons colors",
"reference" : "UX-17",
"importance" : "MEDIUM",
"status" : "APPROVED"
} ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/action-words/721"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/6"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the id of the action word |
|
|
the action itself with its parameters |
|
|
the description of the action word |
|
|
the automation framework used for the last implementation of the action word |
|
|
the date when the action word was last implemented |
|
|
the user who created this action word |
|
|
the date the action word was created |
|
|
the user who last modified the action word |
|
|
the date the action word was last modified |
|
|
the project the action word belongs to |
|
|
the parameters of the action word |
|
|
the test cases which use this action word |
|
|
related links |
Delete action words
A DELETE
to /action-words/{ids}
deletes the action word(s) with the given id(s).
HTTP request
DELETE /api/rest/latest/action-words/14,38,278,1247 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the action words |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 123
"The action words with the following identifiers were not deleted because they are used in at least one test step: 14, 278"