GET /rest/v1/softwaremoduletypes
Implementation notes
Handles the GET request of retrieving all software module types within SP. Required Permission: READ_REPOSITORY
Get software module types
CURL
$ curl 'https://management-api.host.com/rest/v1/softwaremoduletypes' -i -X GET \
-H 'Accept: application/json'
Request URL
GET /rest/v1/softwaremoduletypes HTTP/1.1
Accept: application/json
Host: management-api.host.com
Request query parameter
Parameter | Description |
---|---|
|
The maximum number of entries in a page (default is 50). |
|
The query parameter sort allows to define the sort order for the result of a query. A sort criteria consists of the name of a field and the sort direction (ASC for ascending and DESC descending). The sequence of the sort criteria (multiple can be used) defines the sort order of the entities in the result. |
|
The paging offset (default is 0). |
|
Query fields based on the Feed Item Query Language (FIQL). See Entity Definitions for available fields. |
Request parameter example
GET /rest/v1/softwaremoduletypes?limit=10&sort=name:ASC&offset=0&q=name%3D%3Da HTTP/1.1
Accept: application/json
Host: management-api.host.com
Response (Status 200)
Response fields
Path | Type | Description | Allowed Values |
---|---|---|---|
size |
Number |
Current page size |
|
total |
Number |
Total number of elements |
|
content |
Array |
List of provisioning targets. |
|
content[].createdBy |
String |
Entity was originally created by User, AMQP-Controller, anonymous etc.) |
|
content[].createdAt |
Number |
Entity was originally created at (timestamp UTC in milliseconds) |
|
content[].description |
String |
The description of the entity |
|
content[].id |
Number |
The technical identifier of the entity |
|
content[].lastModifiedAt |
Number |
Entity was last modified at (timestamp UTC in milliseconds) |
|
content[].lastModifiedBy |
String |
Entity was last modified by User, AMQP-Controller, anonymous etc.) |
|
content[].name |
String |
The name of the entity |
Response example
HTTP/1.1 200 OK
Content-Length: 1760
Content-Type: application/json;charset=UTF-8
{
"content" : [ {
"createdBy" : "system",
"createdAt" : 1564644698975,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1564644698981,
"name" : "OS",
"description" : "Updated description.",
"key" : "os",
"maxAssignments" : 1,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/368"
}
},
"id" : 368
}, {
"createdBy" : "system",
"createdAt" : 1564644698974,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1564644698983,
"name" : "Application",
"description" : "Updated description.",
"key" : "application",
"maxAssignments" : 2147483647,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/369"
}
},
"id" : 369
}, {
"createdBy" : "bumlux",
"createdAt" : 1564644698985,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1564644698987,
"name" : "runtime",
"description" : "Updated description.",
"key" : "runtime",
"maxAssignments" : 1,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/370"
}
},
"id" : 370
}, {
"createdBy" : "uploadTester",
"createdAt" : 1564644699003,
"lastModifiedBy" : "uploadTester",
"lastModifiedAt" : 1564644699004,
"name" : "test123",
"description" : "Desc1234",
"key" : "test123",
"maxAssignments" : 1,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/371"
}
},
"id" : 371
} ],
"total" : 4,
"size" : 4
}
Error responses
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies. |
See Error body |
|
The http request method is not allowed on the resource. |
|
|
In case accept header is specified and not application/json. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
POST /rest/v1/softwaremoduletypes
Implementation notes
Handles the POST request of creating new software module types within SP. The request body must always be a list of module types. Required Permission: CREATE_REPOSITORY
Creating software module types
CURL
$ curl 'https://management-api.host.com/rest/v1/softwaremoduletypes' -i -X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '[ {
"name" : "TestName1",
"description" : "Desc1",
"maxAssignments" : 1,
"key" : "test1"
} ]'
Request URL
POST /rest/v1/softwaremoduletypes HTTP/1.1
Accept: application/json
Content-Type: application/json;charset=UTF-8
Content-Length: 100
Host: management-api.host.com
[ {
"name" : "TestName1",
"description" : "Desc1",
"maxAssignments" : 1,
"key" : "test1"
} ]
Request fields
Path | Type | Description | Allowed Values | Mandatory |
---|---|---|---|---|
[]description |
String |
The description of the entity |
||
[]key |
String |
The key of the software module type. |
||
[]maxAssignments |
Number |
Maximum number of assignments to a distribution set/target, e.g. only one firmware but multiple applications. |
||
[]name |
String |
The name of the entity |
X |
Response (Status 201)
Response fields
Path | Type | Description | Allowed Values |
---|---|---|---|
[]key |
String |
The key of the software module type. |
|
[]maxAssignments |
Number |
Software modules of that type can be assigned at this maximum number (e.g. operating system only once). |
|
[]createdBy |
String |
Entity was originally created by User, AMQP-Controller, anonymous etc.) |
|
[]createdAt |
Number |
Entity was originally created at (timestamp UTC in milliseconds) |
|
[]description |
String |
The description of the entity |
|
[]deleted |
Boolean |
Deleted flag, used for soft deleted entities |
|
[]id |
Number |
The technical identifier of the entity |
|
[]lastModifiedAt |
Number |
Entity was last modified at (timestamp UTC in milliseconds) |
|
[]lastModifiedBy |
String |
Entity was last modified by User, AMQP-Controller, anonymous etc.) |
|
[]name |
String |
The name of the entity |
Response example
HTTP/1.1 201 Created
Content-Length: 393
Content-Type: application/json;charset=UTF-8
[ {
"createdBy" : "uploadTester",
"createdAt" : 1564644704073,
"lastModifiedBy" : "uploadTester",
"lastModifiedAt" : 1564644704073,
"name" : "TestName1",
"description" : "Desc1",
"key" : "test1",
"maxAssignments" : 1,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/375"
}
},
"id" : 375
} ]
Error responses
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies. |
See Error body |
|
Not Found Software Module Type. |
See Error body |
|
The http request method is not allowed on the resource. |
|
|
In case accept header is specified and not application/json. |
|
|
E.g. in case an entity is created or modified by another user in another request at the same time. You may retry your modification request. |
See Error body |
|
The request was attempt with a media-type which is not supported by the server for this resource. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
DELETE /rest/v1/softwaremoduletypes/{softwareModuleTypeId}
Implementation Notes
Handles the DELETE request for a single software module type within SP. Required Permission: DELETE_REPOSITORY
Delete software module type
CURL
$ curl 'https://management-api.host.com/rest/v1/softwaremoduletypes/359' -i -X DELETE
Request URL
DELETE /rest/v1/softwaremoduletypes/359 HTTP/1.1
Host: management-api.host.com
Request path parameter
Parameter | Description |
---|---|
softwareModuleTypeID |
The technical identifier of the entity |
Response (Status 200)
Response example
HTTP/1.1 200 OK
Error responses
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies. |
See Error body |
|
Not Found Target. |
See Error body |
|
The http request method is not allowed on the resource. |
|
|
In case accept header is specified and not application/json. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
GET /rest/v1/softwaremoduletypes/{softwareModuleTypeId}
Implementation notes
Handles the GET request of retrieving a single software module type within SP. Required Permission: READ_REPOSITORY
Accessing a software module type
CURL
$ curl 'https://management-api.host.com/rest/v1/softwaremoduletypes/367' -i -X GET \
-H 'Accept: application/json'
Request URL
GET /rest/v1/softwaremoduletypes/367 HTTP/1.1
Accept: application/json
Host: management-api.host.com
Request path parameter
Parameter | Description |
---|---|
softwareModuleTypeID |
The technical identifier of the entity |
Response (Status 200)
Response fields
Path | Type | Description | Allowed Values |
---|---|---|---|
key |
String |
The key of the software module type. |
|
maxAssignments |
Number |
Software modules of that type can be assigned at this maximum number (e.g. operating system only once). |
|
createdBy |
String |
Entity was originally created by User, AMQP-Controller, anonymous etc.) |
|
createdAt |
Number |
Entity was originally created at (timestamp UTC in milliseconds) |
|
description |
String |
The description of the entity |
|
deleted |
Boolean |
Deleted flag, used for soft deleted entities |
|
id |
Number |
The technical identifier of the entity |
|
lastModifiedAt |
Number |
Entity was last modified at (timestamp UTC in milliseconds) |
|
lastModifiedBy |
String |
Entity was last modified by User, AMQP-Controller, anonymous etc.) |
|
name |
String |
The name of the entity |
Response example
HTTP/1.1 200 OK
Content-Length: 392
Content-Type: application/json;charset=UTF-8
{
"createdBy" : "uploadTester",
"createdAt" : 1564644693946,
"lastModifiedBy" : "uploadTester",
"lastModifiedAt" : 1564644693949,
"name" : "test123",
"description" : "Desc1234",
"key" : "test123",
"maxAssignments" : 1,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/367"
}
},
"id" : 367
}
Error responses
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies. |
See Error body |
|
The http request method is not allowed on the resource. |
|
|
In case accept header is specified and not application/json. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
PUT /rest/v1/softwaremoduletypes/{softwareModuleTypeId}
Implementation notes
Handles the PUT request for a single software module type within SP. Required Permission: UPDATE_REPOSITORY
Updating a software module types
CURL
$ curl 'https://management-api.host.com/rest/v1/softwaremoduletypes/363' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"description" : "a new description"
}'
Request URL
PUT /rest/v1/softwaremoduletypes/363 HTTP/1.1
Content-Length: 41
Content-Type: application/json;charset=UTF-8
Host: management-api.host.com
{
"description" : "a new description"
}
Request path parameter
Parameter | Description |
---|---|
softwareModuleTypeID |
The technical identifier of the entity |
Request fields
Path | Type | Description | Allowed Values | Mandatory |
---|---|---|---|---|
description |
String |
The description of the entity |
X |
Response (Status 200)
Response fields
Path | Type | Description | Allowed Values |
---|---|---|---|
key |
String |
The key of the software module type. |
|
maxAssignments |
Number |
Software modules of that type can be assigned at this maximum number (e.g. operating system only once). |
|
createdBy |
String |
Entity was originally created by User, AMQP-Controller, anonymous etc.) |
|
createdAt |
Number |
Entity was originally created at (timestamp UTC in milliseconds) |
|
description |
String |
The description of the entity |
|
deleted |
Boolean |
Deleted flag, used for soft deleted entities |
|
id |
Number |
The technical identifier of the entity |
|
lastModifiedAt |
Number |
Entity was last modified at (timestamp UTC in milliseconds) |
|
lastModifiedBy |
String |
Entity was last modified by User, AMQP-Controller, anonymous etc.) |
|
name |
String |
The name of the entity |
Response example
HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8
Content-Length: 389
{
"createdBy" : "bumlux",
"createdAt" : 1564644688874,
"lastModifiedBy" : "bumlux",
"lastModifiedAt" : 1564644688879,
"name" : "test123",
"description" : "a new description",
"key" : "test123",
"maxAssignments" : 1,
"deleted" : false,
"_links" : {
"self" : {
"href" : "https://management-api.host.com/rest/v1/softwaremoduletypes/363"
}
},
"id" : 363
}
Error responses
HTTP Status Code | Reason | Response Model |
---|---|---|
|
Bad Request - e.g. invalid parameters |
|
|
The request requires user authentication. |
|
|
Insufficient permissions, entity is not allowed to be changed (i.e. read-only) or data volume restriction applies. |
See Error body |
|
Not Found Software Module Type. |
See Error body |
|
The http request method is not allowed on the resource. |
|
|
In case accept header is specified and not application/json. |
|
|
E.g. in case an entity is created or modified by another user in another request at the same time. You may retry your modification request. |
See Error body |
|
The request was attempt with a media-type which is not supported by the server for this resource. |
|
|
Too many requests. The server will refuse further attempts and the client has to wait another second. |
Additional content
Error body
{
"errorCode": "string",
"exceptionClass": "string",
"message": "string",
"parameters": [
"string"
]
}
Field description
Field |
Description |
errorCode |
A error code/key set by server |
exceptionClass |
The involved exceptionClass |
message |
An error message set by the server |
parameters |
A list of parameters |