Overview
Chrometa provides a simple rest-based API to import data into your application. A user generates a key for your application to use, and you can pull data for that user from the URL show below.
Only data that people have classified under public (i.e. non-personal) projects is available via our API.
Getting your API key
First you need to generate a key
If you already have one, it will be listed here under API KEY
Sample Code
Here are some sample calls (using ruby curl):
Clients and Projects
List clients and projects
c = Curl.get("http://app.chrometa.com/api/v1/events/clients") do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
Create a client
curl --location --request POST 'https://app.chrometa.com/api/v1/events/create_category' \
--header 'X-Api-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"client": {
"name": "my new client"
}
}'
Create a project
curl --location --request POST 'https://app.chrometa.com/api/v1/events/create_category' \
--header 'X-Api-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"project": {
"client_name": "my new client",
"project_name": "my new project 101"
}
}'
Read a project
c = Curl.post("http://app.chrometa.com/api/v1/events/get_project_info?project_id=1234") do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
Read a client
c = Curl.post("http://app.chrometa.com/api/v1/events/get_client_info?client_id=1234") do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
List only active clients and projects
c = Curl.get("http://app.chrometa.com/api/v1/events/clients?active_only=true") do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
List projects for a client
c = Curl.get("http://app.chrometa.com/api/v1/events/clients?client_id=1234") do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
Time
Add a time entry
curl --location --request POST 'https://app.chrometa.com/api/v1/events/create_entries' \
--header 'X-Api-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"entries": [
{
"activity":"David Thomson Affidavit",
"duration": 1440,
"day": "2022-05-30",
"from_timestamp": 1653939045,
"app": "chrometa_manual_entry.exe"
}
]
}'
List entries from 1/1 to 1/10
c = Curl.get("http://app.chrometa.com/api/v1/events/summary", {"from"=>"2018-01-01","to"=>"2018-01-10"}) do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
List entries from 1/1 to 1/10 for a project (get the project id from *List clients and projects)
c = Curl.get("http://app.chrometa.com/api/v1/events/summary", {"from"=>"2018-01-01","to"=>"2018-01-10","project_id"=>1234}) do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
List entries from 1/1 to 1/10 for a client (get the client id from *List clients and projects)
c = Curl.get("http://app.chrometa.com/api/v1/events/summary", {"from"=>"2018-01-01","to"=>"2018-01-10","client_id"=>1234}) do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
List entries from 1/1 to 1/10 for all team members (if you are a team manager)
c = Curl.get("http://app.chrometa.com/api/v1/events/summary", {"from"=>"2018-01-01","to"=>"2018-01-10", "team_data" => "yes"}) do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
Team Information
List team members (if you are a team manager)
c = Curl.get("http://app.chrometa.com/api/v1/events/get_team_info") do |http|
http.headers['X-Api-Key'] = 'your_api_key'
end
Note: If you have questions about our API, please email: support@chrometa.com
Comments
0 comments
Article is closed for comments.