cURL
curl --request POST \
--url https://my.orq.ai/v2/skills/import/repository \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"project_id": "<string>",
"path": "<string>",
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
}
}
'import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY });
const result = await orq.skills.importFromRepository({
connectionId: 'connection-id',
repositoryUrl: 'https://github.com/example/skills',
ref: 'main',
subdirectory: 'skills/review',
projectId: 'project-id',
});
console.log(result);import requests
url = "https://my.orq.ai/v2/skills/import/repository"
payload = {
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"project_id": "<string>",
"path": "<string>",
"sharing": {
"all_projects": {},
"selected": { "project_ids": ["<string>"] },
"allow_version_pin": True,
"allow_fork": True,
"auto_grant_new_projects": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"skill": {
"skill_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"project_id": "<string>",
"path": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"updated_by_id": "<string>",
"instructions": "<string>",
"version": "<string>",
"files": [
{
"path": "<string>",
"size_bytes": "<string>",
"sha256": "<string>",
"content_type": "<string>"
}
],
"has_files": true,
"repository_source": {
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"commit_sha": "<string>"
},
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
}
}
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Skills
Import a skill from a repository
Creates an editable skill snapshot from a repository directory using a workspace source control connection. The source commit is retained; subsequent repository changes are not synchronized.
POST
/
v2
/
skills
/
import
/
repository
cURL
curl --request POST \
--url https://my.orq.ai/v2/skills/import/repository \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"project_id": "<string>",
"path": "<string>",
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
}
}
'import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY });
const result = await orq.skills.importFromRepository({
connectionId: 'connection-id',
repositoryUrl: 'https://github.com/example/skills',
ref: 'main',
subdirectory: 'skills/review',
projectId: 'project-id',
});
console.log(result);import requests
url = "https://my.orq.ai/v2/skills/import/repository"
payload = {
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"project_id": "<string>",
"path": "<string>",
"sharing": {
"all_projects": {},
"selected": { "project_ids": ["<string>"] },
"allow_version_pin": True,
"allow_fork": True,
"auto_grant_new_projects": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"skill": {
"skill_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"project_id": "<string>",
"path": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"updated_by_id": "<string>",
"instructions": "<string>",
"version": "<string>",
"files": [
{
"path": "<string>",
"size_bytes": "<string>",
"sha256": "<string>",
"content_type": "<string>"
}
],
"has_files": true,
"repository_source": {
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"commit_sha": "<string>"
},
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
}
}
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Related guide: Skills guide. See the Skills guide for a walkthrough with examples.
Authorizations
Body
application/json
Was this page helpful?