# Create a new Argo project

Create a new Argo project

Endpoint: POST /gitops/api/v1/agents/{agentIdentifier}/projects
Version: 1.0
Security: x-api-key

## Path parameters:

  - `agentIdentifier` (string, required)
    Agent identifier for entity.

## Query parameters:

  - `accountIdentifier` (string)
    Account Identifier for the Entity.

  - `orgIdentifier` (string)
    Organization Identifier for the Entity.

  - `projectIdentifier` (string)
    Project Identifier for the Entity.

## Request fields (application/json):

  - `project` (object)

  - `project.metadata` (object)
    ObjectMeta is metadata that all persisted resources must have, which includes all objects
users must create.

  - `project.metadata.name` (string)

  - `project.metadata.generateName` (string)
    GenerateName is an optional prefix, used by the server, to generate a unique
name ONLY IF the Name field has not been provided.
If this field is used, the name returned to the client will be different
than the name passed. This value will also be combined with a unique suffix.
The provided value has the same validation rules as the Name field,
and may be truncated by the length of the suffix required to make the value
unique on the server.

If this field is specified and the generated name exists, the server will return a 409.

Applied only if Name is not specified.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
+optional

  - `project.metadata.namespace` (string)
    Namespace defines the space within which each name must be unique. An empty namespace is
equivalent to the "default" namespace, but "default" is the canonical representation.
Not all objects are required to be scoped to a namespace - the value of this field for
those objects will be empty.

Must be a DNS_LABEL.
Cannot be updated.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
+optional

  - `project.metadata.selfLink` (string)

  - `project.metadata.uid` (string)
    UID is the unique in time and space value for this object. It is typically generated by
the server on successful creation of a resource and is not allowed to change on PUT
operations.

Populated by the system.
Read-only.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
+optional

  - `project.metadata.resourceVersion` (string)
    An opaque value that represents the internal version of this object that can
be used by clients to determine when objects have changed. May be used for optimistic
concurrency, change detection, and the watch operation on a resource or set of resources.
Clients must treat these values as opaque and passed unmodified back to the server.
They may only be valid for a particular resource or set of resources.

Populated by the system.
Read-only.
Value must be treated as opaque by clients and .
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
+optional

  - `project.metadata.generation` (string)

  - `project.metadata.creationTimestamp` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `project.metadata.creationTimestamp.seconds` (string)
    Represents seconds of UTC time since Unix epoch
1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
9999-12-31T23:59:59Z inclusive.

  - `project.metadata.creationTimestamp.nanos` (integer)
    Non-negative fractions of a second at nanosecond resolution. Negative
second values with fractions must still have non-negative nanos values
that count forward in time. Must be from 0 to 999,999,999
inclusive. This field may be limited in precision depending on context.

  - `project.metadata.deletionTimestamp` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `project.metadata.deletionGracePeriodSeconds` (string)

  - `project.metadata.labels` (object)

  - `project.metadata.annotations` (object)

  - `project.metadata.ownerReferences` (array)

  - `project.metadata.ownerReferences.apiVersion` (string)
    API version of the referent.

  - `project.metadata.ownerReferences.kind` (string)

  - `project.metadata.ownerReferences.name` (string)

  - `project.metadata.ownerReferences.uid` (string)

  - `project.metadata.ownerReferences.controller` (boolean)

  - `project.metadata.ownerReferences.blockOwnerDeletion` (boolean)

  - `project.metadata.finalizers` (array)

  - `project.metadata.managedFields` (array)
    ManagedFields maps workflow-id and version to the set of fields
that are managed by that workflow. This is mostly for internal
housekeeping, and users typically shouldn't need to set or
understand this field. A workflow can be the user's name, a
controller's name, or the name of a specific apply path like
"ci-cd". The set of fields is always in the version that the
workflow used when modifying the object.

+optional
+listType=atomic

  - `project.metadata.managedFields.manager` (string)
    Manager is an identifier of the workflow managing these fields.

  - `project.metadata.managedFields.operation` (string)
    Operation is the type of operation which lead to this ManagedFieldsEntry being created.
The only valid values for this field are 'Apply' and 'Update'.

  - `project.metadata.managedFields.apiVersion` (string)
    APIVersion defines the version of this resource that this field set
applies to. The format is "group/version" just like the top-level
APIVersion field. It is necessary to track the version of a field
set because it cannot be automatically converted.

  - `project.metadata.managedFields.time` (object)
    Time is a wrapper around time.Time which supports correct
marshaling to YAML and JSON.  Wrappers are provided for many
of the factory methods that the time package offers.

+protobuf.options.marshal=false
+protobuf.as=Timestamp
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `project.metadata.managedFields.fieldsType` (string)

  - `project.metadata.managedFields.fieldsV1` (object)
    FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.

Each key is either a '.' representing the field itself, and will always map to an empty set,
or a string representing a sub-field or item. The string will follow one of these four formats:
'f:', where  is the name of a field in a struct, or key in a map
'v:', where  is the exact json formatted value of a list item
'i:', where  is position of a item in a list
'k:', where  is a map of  a list item's key fields to their unique values
If a key maps to an empty Fields value, the field that key represents is part of the set.

The exact format is defined in sigs.k8s.io/structured-merge-diff
+protobuf.options.(gogoproto.goproto_stringer)=false

  - `project.metadata.managedFields.fieldsV1.Raw` (string)
    Raw is the underlying serialization of this object.

  - `project.metadata.managedFields.subresource` (string)
    Subresource is the name of the subresource used to update that object, or
empty string if the object was updated through the main resource. The
value of this field is used to distinguish between managers, even if they
share the same name. For example, a status update will be distinct from a
regular update using the same manager name.
Note that the APIVersion field is not related to the Subresource field and
it always corresponds to the version of the main resource.

  - `project.spec` (object)

  - `project.spec.sourceRepos` (array)

  - `project.spec.destinations` (array)

  - `project.spec.destinations.server` (string)

  - `project.spec.destinations.namespace` (string)

  - `project.spec.destinations.name` (string)

  - `project.spec.description` (string)

  - `project.spec.roles` (array)

  - `project.spec.roles.name` (string)

  - `project.spec.roles.description` (string)

  - `project.spec.roles.policies` (array)

  - `project.spec.roles.jwtTokens` (array)

  - `project.spec.roles.jwtTokens.iat` (string)

  - `project.spec.roles.jwtTokens.exp` (string)

  - `project.spec.roles.jwtTokens.id` (string)

  - `project.spec.roles.groups` (array)

  - `project.spec.clusterResourceWhitelist` (array)

  - `project.spec.clusterResourceWhitelist.group` (string)

  - `project.spec.clusterResourceWhitelist.kind` (string)

  - `project.spec.clusterResourceWhitelist.name` (string)
    Name is the name of the restricted resource. Glob patterns using Go's filepath.Match syntax are supported.
Unlike the group and kind fields, if no name is specified, all resources of the specified group/kind are matched.

  - `project.spec.namespaceResourceBlacklist` (array)

  - `project.spec.namespaceResourceBlacklist.group` (string)

  - `project.spec.namespaceResourceBlacklist.kind` (string)

  - `project.spec.orphanedResources` (object)

  - `project.spec.orphanedResources.warn` (boolean)

  - `project.spec.orphanedResources.ignore` (array)

  - `project.spec.orphanedResources.ignore.group` (string)

  - `project.spec.orphanedResources.ignore.kind` (string)

  - `project.spec.orphanedResources.ignore.name` (string)

  - `project.spec.syncWindows` (array)

  - `project.spec.syncWindows.kind` (string)

  - `project.spec.syncWindows.schedule` (string)

  - `project.spec.syncWindows.duration` (string)

  - `project.spec.syncWindows.applications` (array)

  - `project.spec.syncWindows.namespaces` (array)

  - `project.spec.syncWindows.clusters` (array)

  - `project.spec.syncWindows.manualSync` (boolean)

  - `project.spec.syncWindows.timeZone` (string)

  - `project.spec.syncWindows.project` (string)

  - `project.spec.namespaceResourceWhitelist` (array)

  - `project.spec.signatureKeys` (array)

  - `project.spec.signatureKeys.keyID` (string)

  - `project.spec.clusterResourceBlacklist` (array)

  - `project.spec.sourceNamespaces` (array)

  - `project.spec.permitOnlyProjectScopedClusters` (boolean)

  - `project.spec.destinationServiceAccounts` (array)
    DestinationServiceAccounts holds information about the service accounts to be impersonated for the application sync operation for each destination.

  - `project.spec.destinationServiceAccounts.server` (string)
    Server specifies the URL of the target cluster's Kubernetes control plane API.

  - `project.spec.destinationServiceAccounts.namespace` (string)
    Namespace specifies the target namespace for the application's resources.

  - `project.spec.destinationServiceAccounts.defaultServiceAccount` (string)

  - `project.status` (object)

  - `project.status.jwtTokensByRole` (object)

  - `upsert` (boolean)

## Response default fields (application/json):

  - `error` (string)

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.type_url` (string)
    A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration). The name should be in a canonical form
(e.g., leading "." is not accepted).

In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http, https, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:

* If no scheme is provided, https is assumed.
* An HTTP GET on the URL must yield a [google.protobuf.Type][]
  value in binary format, or produce an error.
* Applications are allowed to cache lookup results based on the
  URL, or have them precompiled into a binary to avoid any
  lookup. Therefore, binary compatibility needs to be preserved
  on changes to types. (Use versioned type names to manage
  breaking changes.)

Note: this functionality is not currently available in the official
protobuf release, and it is not used for type URLs beginning with
type.googleapis.com. As of May 2023, there are no widely used type server
implementations and no plans to implement one.

Schemes other than http, https (or the empty scheme) might be
used with implementation specific semantics.

  - `details.value` (string)
    Must be a valid serialized protocol buffer of the above specified type.


