Update module source

put/modules/{moduleId}/source
Internal-Use Only

Replaces the module source of the specified module with values in the request body.

Request Samples

1

Response Samples

1{
2 "links": [
3 {
4 "method": "GET",
5 "rel": "up",
6 "href": "/microanalyticScore/modules/endtoend",
7 "uri": "/microanalyticScore/modules/endtoend",
8 "type": "application/vnd.sas.microanalytic.module"
9 },
10 {
11 "method": "GET",
12 "rel": "self",
13 "href": "/microanalyticScore/modules/endtoend/source",
14 "uri": "/microanalyticScore/modules/endtoend/source",
15 "type": "application/vnd.sas.microanalytic.module.source"
16 },
17 {
18 "method": "PUT",
19 "rel": "update",
20 "href": "/microanalyticScore/modules/endtoend/source",
21 "uri": "/microanalyticScore/modules/endtoend/source",
22 "type": "application/vnd.sas.microanalytic.module.source",
23 "responseType": "application/vnd.sas.microanalytic.module.source"
24 }
25 ],
26 "version": 2,
27 "createdBy": "sasdemo",
28 "creationTimeStamp": "2022-05-04T13:11:25.715Z",
29 "modifiedBy": "sasdemo",
30 "modifiedTimeStamp": "2022-05-05T15:04:22.520Z",
31 "moduleId": "endtoend",
32 "source": "package endtoend /overwrite=yes;\nmethod variable_test(varchar(32767) in_string, bigint in_int, double in_float, bigint in_boolean, in_out varchar out_string, in_out bigint out_int, in_out double out_float, in_out bigint out_boolean);\nout_int=in_int - 2;\nout_float=in_float + 1.11;\nif (in_boolean = 0) then out_boolean=1;\nelse out_boolean=0;\nout_string=reverse(in_string);\nend;\nendpackage;"
33}

Path Parameters

NameTypeRequiredDescription
moduleId
string
true

The identifier of the module to update.

Header Parameters

NameTypeRequiredDescription
If-Match
string
false

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

If-Unmodified-Since
string
false

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

Request Body

The new module source to load.

The source code of the module or submodule.

NameTypeRequiredDescription
version
integer
false

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

Default:
2
moduleId
string
false

A unique string that identifies the module that contains this source.

submoduleId
string
false

Optional unique string that identifies the submodule that contains this source. This is omitted if the source code is for a module.

source
string
false

The source code used.

links
array [Link]
false

A collection of links to related resources or operations.

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 header did not include an If-Match or If-Unmodified-Since precondition. Set the appropriate values for the If-Unmodified-Since and If-Match request headers before reattempting the request.Schema