> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/api/api-ja/devops-api/commits.md).

# Commits

## Commit components to a branch

> Creates a new branch commit from the provided component payload. Each component may include one or more files, and file contents must be supplied as Base64-encoded strings.

```json
{"openapi":"3.0.0","info":{"title":"Flosum Devops Api","version":"1.136.0-dev.5"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Bearer access_token"}},"schemas":{"CommitComponentBodyDto":{"type":"object","properties":{"branchId":{"type":"number","description":"Identifier of the target branch that will receive the commit."},"message":{"type":"string","description":"Commit message shown in commit history."},"components":{"description":"Components to include in the commit.","type":"array","items":{"$ref":"#/components/schemas/CommitComponentsBodyItem"}}},"required":["branchId","message","components"]},"CommitComponentsBodyItem":{"type":"object","properties":{"name":{"type":"string","description":"Component API name."},"type":{"type":"string","description":"Metadata component type."},"origin":{"description":"Optional source reference from which the component content was taken.","allOf":[{"$ref":"#/components/schemas/OriginDto"}]},"externalUpdatedAt":{"format":"date-time","type":"string","description":"Timestamp of the latest update in the external source system."},"externalUpdatedBy":{"type":"string","description":"User name of the person who last updated the component in the external source system."},"platformType":{"type":"string","enum":["Salesforce","Vlocity"],"description":"Platform the component belongs to."},"label":{"type":"string","description":"Human-readable label for the component."},"files":{"description":"Files that make up the component. File contents must be Base64 encoded.","type":"array","items":{"$ref":"#/components/schemas/CommitComponentBodyFilesItem"}}},"required":["name","type","platformType","label","files"]},"OriginDto":{"type":"object","properties":{"type":{"type":"string","enum":["Organization","Branch","Git","AI","CLI"],"description":"Type of external source from which the component content was taken."},"name":{"type":"string","description":"Name of the external source reference."}},"required":["type","name"]},"CommitComponentBodyFilesItem":{"type":"object","properties":{"path":{"type":"string","description":"Relative file path inside the metadata package."},"content":{"type":"string","description":"Content in base64 format"}},"required":["path","content"]},"ExceptionDto":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"},"statusCode":{"type":"number","enum":[400,401,403,404,405,406,408,409,410,412,413,414,415,418,420,422,428,429,431,500,502,503,504]}},"required":["message","error","statusCode"]}}},"paths":{"/topologies/{topologyId}/fit/commits":{"post":{"operationId":"CommitsController_create","summary":"Commit components to a branch","description":"Creates a new branch commit from the provided component payload. Each component may include one or more files, and file contents must be supplied as Base64-encoded strings.","parameters":[{"name":"topologyId","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitComponentBodyDto"}}}},"responses":{"201":{"description":"Commit has been successfully created"},"400":{"description":"Invalid commit payload or incomplete component data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"404":{"description":"The target branch or another required resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"500":{"description":"Unexpected internal error while processing commits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}}},"tags":["Commits"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/api/api-ja/devops-api/commits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
