Update a module

put/modules/{moduleId}
Internal-Use Only

For the specified module, replaces the existing module with values from the request body. Please note, the source of the module is not replaced.

Request Samples

1

Response Samples

1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "up",
6 "href": "/microanalyticScore/modules",
7 "uri": "/microanalyticScore/modules",
8 "type": "application/vnd.sas.collection",
9 "itemType": "application/vnd.sas.microanalytic.module"
10 },
11 {
12 "method": "GET",
13 "rel": "self",
14 "href": "/microanalyticScore/modules/samplemodule",
15 "uri": "/microanalyticScore/modules/samplemodule",
16 "type": "application/vnd.sas.microanalytic.module"
17 },
18 {
19 "method": "GET",
20 "rel": "source",
21 "href": "/microanalyticScore/modules/samplemodule/source",
22 "uri": "/microanalyticScore/modules/samplemodule/source",
23 "type": "application/vnd.sas.microanalytic.module.source"
24 },
25 {
26 "method": "GET",
27 "rel": "steps",
28 "href": "/microanalyticScore/modules/samplemodule/steps",
29 "uri": "/microanalyticScore/modules/samplemodule/steps",
30 "type": "application/vnd.sas.collection",
31 "itemType": "application/vnd.sas.microanalytic.module.step"
32 },
33 {
34 "method": "GET",
35 "rel": "submodules",
36 "href": "/microanalyticScore/modules/samplemodule/submodules",
37 "uri": "/microanalyticScore/modules/samplemodule/submodules",
38 "type": "application/vnd.sas.collection",
39 "itemType": "application/vnd.sas.microanalytic.submodule"
40 },
41 {
42 "method": "PUT",
43 "rel": "update",
44 "href": "/microanalyticScore/modules/samplemodule",
45 "uri": "/microanalyticScore/modules/samplemodule",
46 "type": "application/vnd.sas.microanalytic.module",
47 "responseType": "application/vnd.sas.microanalytic.module"
48 },
49 {
50 "method": "DELETE",
51 "rel": "delete",
52 "href": "/microanalyticScore/modules/samplemodule",
53 "uri": "/microanalyticScore/modules/samplemodule"
54 }
55 ],
56 "version": 2,
57 "createdBy": "sasdemo",
58 "creationTimeStamp": "2022-03-15T21:19:04.062Z",
59 "modifiedBy": "sasdemo",
60 "modifiedTimeStamp": "2022-05-04T19:49:02.867Z",
61 "id": "samplemodule",
62 "name": "sampleModule",
63 "revision": 0,
64 "description": "Updated sample module.",
65 "scope": "public",
66 "language": "ds2",
67 "stepIds": [
68 "copy_charn_array",
69 "copy_varchar_array",
70 "copy_int_array",
71 "copy_float_array",
72 "copy_bigint_array",
73 "copy_arrays"
74 ],
75 "properties": [
76 {
77 "name": "test property name 2",
78 "value": ""
79 },
80 {
81 "name": "test property name",
82 "value": "test property value"
83 }
84 ],
85 "warnings": []
86}

Path Parameters

NameTypeRequiredDescription
moduleId
string
true

The identifier of the module to update.

Header Parameters

NameTypeRequiredDescription
If-Match
string
false

The Etag that is returned from a GET, POST, or PUT of this module.

If-Unmodified-Since
string
false

The value of the 'lastModified' date of the module. If the module has been updated since this time, the update will fail.

Request Body

The new definition of the module to load. The name of the module in the new definition must match the previously loaded name.

Describes a module that has been compiled and loaded by the service.

NameTypeRequiredDescription
id
string
false

A generated unique string that identifies a module in an installation.

name
string
false

The name that is associated with a module.

revision
integer
false

A whole number that indicates the revision of a module. It starts at 1 and increments by 1 each time the module is revised.

description
string
false

Text that describes the rules and logic performed by the module.

scope
string
false

The scope restricts how a module can be used. The value 'public' indicates the module is available to be called outside another module. The value 'private' indicates that a module can be called only from within another module.

Allowed values:
publicprivate
language
string
false

The language of the module source. DS2 indicates that the module source is written in the DS2 language.

Allowed value:
ds2
creationTimeStamp
string<date-time>
false

The initial creation time of the module.

modifiedTimeStamp
string<date-time>
false

The last revision time of the module.

stepsIds
array [string]
false

An array of step IDs in the module.

properties
array [Property]
false

The properties specified for the module.

warnings
array [Error]
false

Optional object that is included if warnings are generated when this resource is compiled.

links
array [Link]
false

The link relations for the module.

version
integer
false

The media type's schema version number. The current version is 2.

Default:
2

Responses

StatusMeaningDescription
200OKThe request succeeded.HeadersSchema
400Bad RequestThe request was invalid. The module could not be updated.Schema
404Not FoundThe requested module could not be found.Schema
412Precondition FailedThe If-Match request header did not match the module's Etag or the If-Unmodified-Since request header did not match the module's last modified timestamp.Schema
428Precondition RequiredThe request headers did not include an If-Match or If-Unmodified-Since precondition. Set appropriate values for the If-Unmodified-Since and If-Match request headers before reattempting the request.Schema