Create a code file revision
Creates a new code file revision based on the representation in the request body.
1{2 "creationTimeStamp": "2021-05-06T20:21:04.490Z",3 "modifiedTimeStamp": "2021-05-06T20:21:04.490Z",4 "createdBy": "sasdemo",5 "modifiedBy": "sasdemo",6 "id": "f02aa26d-af06-4198-9705-2306bad711a1",7 "name": "add_cf",8 "majorRevision": 1,9 "minorRevision": 0,10 "checkout": false,11 "locked": true,12 "type": "decisionDS2CodeFile",13 "signature": [14 {15 "name": "a",16 "dataType": "decimal",17 "direction": "input"18 },19 {20 "name": "b",21 "dataType": "decimal",22 "direction": "input"23 },24 {25 "name": "c",26 "dataType": "decimal",27 "direction": "output"28 }29 ],30 "status": "valid",31 "links": [32 {33 "method": "GET",34 "rel": "up",35 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions",36 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions",37 "type": "application/vnd.sas.collection",38 "itemType": "application/vnd.sas.decision.code.file"39 },40 {41 "method": "GET",42 "rel": "self",43 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",44 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",45 "type": "application/vnd.sas.decision.code.file"46 },47 {48 "method": "PUT",49 "rel": "update",50 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",51 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",52 "type": "application/vnd.sas.decision.code.file"53 },54 {55 "method": "GET",56 "rel": "alternate",57 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",58 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",59 "type": "application/vnd.sas.summary"60 },61 {62 "method": "GET",63 "rel": "content",64 "href": "/files/files/2110f410-bb15-41d4-a0a5-e707fececfe9/content",65 "uri": "/files/files/2110f410-bb15-41d4-a0a5-e707fececfe9/content"66 },67 {68 "method": "GET",69 "rel": "decisionStepCode",70 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",71 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",72 "type": "application/vnd.sas.decision.step.code"73 },74 {75 "method": "DELETE",76 "rel": "delete",77 "href": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1",78 "uri": "/decisions/codeFiles/cd404a82-af5b-4835-9672-9730470a6be8/revisions/f02aa26d-af06-4198-9705-2306bad711a1"79 }80 ],81 "sourceRevisionUri": "/decisions/codeFiles/57d3b887-472b-4bd5-a021-b6f336efed41/revisions/200b0999-08ae-4371-a06c-f08d8c246f64",82 "copyTimeStamp": "2021-05-06T20:21:04.490Z",83 "fileUri": "/files/files/2110f410-bb15-41d4-a0a5-e707fececfe9",84 "version": 285}
Name | Type | Required | Description |
---|---|---|---|
codeFileId | string | true | The unique identifier for the code file. Examples: "981ac81f-ad95-46ae-a101-6846683364c5" |
Name | Type | Required | Description |
---|---|---|---|
revisionType | string | false | Valid values are Allowed values: majorminor Examples: "major" |
fromRevisionUri | string</decisions/codeFiles/{codeFileId}/revisions/{revisionId}> | false | This value specifies the URI of the code file revision from which the new code file revision is created. This property enables you to trace the lineage of a code file. The valid format for this parameter is '/decisions/codeFiles/${codeFileId}/revisions/${revisionId}' Examples: "/decisions/codeFiles/981ac81f-ad95-46ae-a101-6846683364c5/revisions/cd942f3c-60a0-4b16-9184-4cb8921fb0eb" |
The details of the code file revision that needs to be created.
Wrapper to file resource, which contains the signature of the code. This represents application/vnd.sas.decision.code.file media type (version 9).
Name | Type | Required | Description |
---|---|---|---|
name | string | false | The code file name. |
description | string | false | The code file description. |
modifiedBy | string | false | The user ID of the authenticated user who last updated the code file. |
modifiedTimeStamp | string<date-time> | false | The date and time that the code file was last modified. |
type | string<enumeration> | true | Type of the code. Allowed values: decisionCustomContextDS2CodeFiledecisionDS2CodeFiledecisionSQLCodeFiledecisionPythonFile |
signature | array [Code File Signature Term] | false | Array of signature terms. |
fileUri | string | true | The URI of the file resource, which contains code. |
testCustomContextUri | string | false | The URI of a Custom Context DS2 code file that provides a custom context to this code file. Normally, this code file's custom context is provided by the decision that utilizes it. For syntax validation and testing purpose, you can specify a testing-only custom context. |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | A code file revision was created. | Headers | Schema |
400 | Bad Request | The request was invalid. | Headers | Schema |