Create a project

post/projects

Creates a project. By default a project package is created. The request fails if a project with the provided name already exists. The created project is returned.

Request Samples

1

Response Samples

1{
2 "createdOn": 0,
3 "description": "The project description.",
4 "uuid": "06312c65-0d8d-4200-9eb8-c5f4b21edd4c",
5 "friendlyName": "simpleProject",
6 "lastModifiedTime": 1674733247986,
7 "modifiedBy": "user1",
8 "packaged": true,
9 "privateProject": true,
10 "remoteGitConnectionName": "remoteConnectionName",
11 "pythonVirtualEnvironment": "pythonEnvironmentName",
12 "luaVirtualEnvironment": "luaEnvironmentName",
13 "tags": [
14 "Project"
15 ],
16 "type": "ESP Project",
17 "uploadTime": 1674733247986,
18 "uploadedBy": "user1",
19 "version": 1,
20 "versionNotes": "This is the initial version.",
21 "versioned": false,
22 "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<project heartbeat-interval=\"1\" name=\"simpleProject\" pubsub=\"auto\" threads=\"1\">\n <contqueries>\n <contquery name=\"cq1\">\n <windows>\n <window-source name=\"source\" pubsub=\"true\">\n <schema>\n <fields>\n <field key=\"true\" name=\"id\" type=\"int64\"/>\n <field name=\"time\" type=\"stamp\"/>\n <field name=\"label\" type=\"string\"/>\n </fields>\n </schema>\n <connectors>\n <connector class=\"timer\" name=\"source_timer\">\n <properties>\n <property name=\"type\"><![CDATA[pub]]></property>\n <property name=\"timeformat\"><![CDATA[%Y-%m-%d %H:%M:%S]]></property>\n <property name=\"basetime\"><![CDATA[2022-01-01 00:00:00]]></property>\n <property name=\"interval\"><![CDATA[2]]></property>\n <property name=\"unit\"><![CDATA[second]]></property>\n </properties>\n </connector>\n </connectors>\n </window-source>\n <window-copy name=\"copy\" pubsub=\"true\">\n <retention type=\"bycount_sliding\">5</retention>\n </window-copy>\n <window-filter name=\"even\">\n <use><![CDATA[id]]></use>\n <code><![CDATA[function filter(data)\n return data.id % 2 == 0\n end]]></code>\n </window-filter>\n <window-filter name=\"odd\">\n <use><![CDATA[id]]></use>\n <code><![CDATA[function filter(data)\n return data.id % 2 == 1\n end]]></code>\n </window-filter>\n </windows>\n <edges>\n <edge source=\"source\" target=\"copy\"/>\n <edge source=\"source\" target=\"even\"/>\n <edge source=\"source\" target=\"odd\"/>\n </edges>\n </contquery>\n </contqueries>\n</project>"
23}

Query Parameters

NameTypeRequiredDescription
copyFrom
string<uuid>
false

The identifier of a project to copy the content from.

Request Body

A representation to create a project.

NameTypeRequiredDescription
description
string
false
<= 255 characters
friendlyName
string
false
packaged
boolean
false
Default:
true
privateProject
boolean
false

By default, newly created projects are private when SAS Event Stream Processing is deployed with other SAS products. Set to False to make this project public.

tags
array [string]
false
versionNotes
string
false
<= 255 characters
xml
string<xml>
false
>= 1 characters

Responses

StatusMeaningDescription
201Created

The request succeeded.

HeadersSchema
400Bad Request

The request was invalid. Additional information is available in the application logs if the environment variable LOGGING_LEVEL_ORG_SPRINGFRAMEWORK is set to DEBUG.

Schema
409Conflict

The request could not be completed due to a conflict with the current state of the resource.

Schema