Create skill
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'owner={
"kind": "org"
}' \
--form archive='@example-file'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/skills"
files = { "archive": ("example-file", open("example-file", "rb")) }
payload = { "owner": "{
\"kind\": \"org\"
}" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('owner', '{
"kind": "org"
}');
form.append('archive', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.omnara.com/v1/orgs/{orgID}/skills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/skills"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.omnara.com/v1/orgs/{orgID}/skills")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"owner": {
"kind": "org"
},
"name": "<string>",
"revision_id": "<string>",
"revision": 2,
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"skill_md": "<string>"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Skills
Create skill
Uploads a skill archive. If a skill with the archive’s name already exists for the requested owner, the upload becomes the skill’s next revision. The owner is immutable after creation.
POST
/
orgs
/
{orgID}
/
skills
Create skill
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/skills \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'owner={
"kind": "org"
}' \
--form archive='@example-file'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/skills"
files = { "archive": ("example-file", open("example-file", "rb")) }
payload = { "owner": "{
\"kind\": \"org\"
}" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('owner', '{
"kind": "org"
}');
form.append('archive', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.omnara.com/v1/orgs/{orgID}/skills', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/skills"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.omnara.com/v1/orgs/{orgID}/skills")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"owner\"\r\n\r\n{\r\n \"kind\": \"org\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"archive\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"org_id": "<string>",
"owner": {
"kind": "org"
},
"name": "<string>",
"revision_id": "<string>",
"revision": 2,
"description": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"skill_md": "<string>"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "invalid_request"
}{
"error": "<string>",
"code": "internal_error"
}Authorizations
bearerAuthbrowserSessionCookie & csrfHeader
An opaque Omnara personal or organization bearer token.
Path Parameters
Pattern:
^org_[a-z2-7]{26}$Body
multipart/form-data
Response
Skill created.
Pattern:
^skl_[a-z2-7]{26}$Pattern:
^org_[a-z2-7]{26}$- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Machine-readable skill identifier consisting of lowercase ASCII segments separated by single hyphens.
Required string length:
1 - 64Pattern:
^[a-z0-9]+(?:-[a-z0-9]+)*$Pattern:
^skr_[a-z2-7]{26}$Latest revision number of the skill.
Required range:
x >= 1⌘I