Introduction
Welcome to our API documentation!
Authenticating requests
This API is not authenticated.
Collection
Get all collections
Will only return collections from authenticated user current organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/collections?contains=dignissimos" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections"
);
let params = {
"contains": "dignissimos",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/collections
Query Parameters
contains
string optional
If provided, will only return collections where name matches query param
Get all collections
Will only return collections from authenticated user current organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/collections-for-user?contains=laudantium" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections-for-user"
);
let params = {
"contains": "laudantium",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/collections-for-user
Query Parameters
contains
string optional
If provided, will only return collections where name matches query param
Get all collections that has the possibility of having relations.
Will only return collections from authenticated user current organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/relationable-collections" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/relationable-collections"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/relationable-collections
Get collection
Will only return collections from authenticated user current organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/collections/{id}?id=officia" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections/{id}"
);
let params = {
"id": "officia",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/collections/{id}
Query Parameters
id
string
The collection id
api/collections/{id}
Example request:
curl -X DELETE \
"http://dataentry.test/api/collections/{id}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections/{id}"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
DELETE
api/collections/{id}
Get all Entry ids for at given collection
Will only return collections from authenticated user current organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/collections/{id}/entry-ids?id=id" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections/{id}/entry-ids"
);
let params = {
"id": "id",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/collections/{id}/entry-ids
Query Parameters
id
string
The collection to retrieve entries from
Create Collection with fields
Creates both the collection and its fields.
Example request:
curl -X POST \
"http://dataentry.test/api/collections" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"doloremque","description":"qui","organization_id":7,"users":"{'users':[{'id':1,'permission':4}]}","with_sql_shadow":false,"fields":[{"text":{}}],"organization":2}'
const url = new URL(
"http://dataentry.test/api/collections"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "doloremque",
"description": "qui",
"organization_id": 7,
"users": "{'users':[{'id':1,'permission':4}]}",
"with_sql_shadow": false,
"fields": [
{
"text": {}
}
],
"organization": 2
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/collections
Body Parameters
name
string
The name of the collection
description
string
The description of the collection
organization_id
integer optional
users
array optional
The users to attach to the collection.
with_sql_shadow
boolean optional
fields
array optional
The fields to attach to the collection.
fields.*.text
string optional
organization
integer optional
The organization the collection belongs. If not provided will default to authenticated user current organization
Update Collection with fields.
Example request:
curl -X POST \
"http://dataentry.test/api/collections/{id}/update?id=ut" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"saepe","with_sql_shadow":false,"description":"ut","organization_id":16,"users":"{'users':[{'id':1,'permission':4}]}","fields":"'fields':[{'name':'FieldName','type':'text','constraints':['required'],'default':'Default','option':'','select_values':[],'has_meta':true,'meta_name':'Test','meta_type':'number'}]","organization":9}'
const url = new URL(
"http://dataentry.test/api/collections/{id}/update"
);
let params = {
"id": "ut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "saepe",
"with_sql_shadow": false,
"description": "ut",
"organization_id": 16,
"users": "{'users':[{'id':1,'permission':4}]}",
"fields": "'fields':[{'name':'FieldName','type':'text','constraints':['required'],'default':'Default','option':'','select_values':[],'has_meta':true,'meta_name':'Test','meta_type':'number'}]",
"organization": 9
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/collections/{id}/update
Query Parameters
id
string
The collection to update
Body Parameters
name
string
The name of the collection
with_sql_shadow
boolean optional
description
string
The description of the collection
organization_id
integer optional
users
array optional
The users to attach to the collection.
fields
array optional
The fields to attach to the collection.
organization
integer optional
The organization the collection belongs. If not provided will default to authenticated user current organization
Endpoints
api/test
Example request:
curl -X GET \
-G "http://dataentry.test/api/test" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/test"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/test
api/collections/{id}/run-alteryx-flow
Example request:
curl -X POST \
"http://dataentry.test/api/collections/{id}/run-alteryx-flow" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections/{id}/run-alteryx-flow"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/collections/{id}/run-alteryx-flow
api/collections/{id}/is-job-done
Example request:
curl -X POST \
"http://dataentry.test/api/collections/{id}/is-job-done" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections/{id}/is-job-done"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/collections/{id}/is-job-done
Entries
Get a single entry.
Example request:
curl -X GET \
-G "http://dataentry.test/api/entries/{oid}?entryOid=est" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/entries/{oid}"
);
let params = {
"entryOid": "est",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/entries/{oid}
Query Parameters
entryOid
string optional
The entry to retrieve
Delete an entry.
Example request:
curl -X DELETE \
"http://dataentry.test/api/entries/{oid}?oid=dolorem" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/entries/{oid}"
);
let params = {
"oid": "dolorem",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
DELETE
api/entries/{oid}
Query Parameters
oid
string optional
The entry to delete.
Get entry with parent collection.
Example request:
curl -X GET \
-G "http://dataentry.test/api/entries-with-entity/{oid}?oid=vel" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/entries-with-entity/{oid}"
);
let params = {
"oid": "vel",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/entries-with-entity/{oid}
Query Parameters
oid
string optional
The entry to retrieve.
Get all the entries.
Example request:
curl -X GET \
-G "http://dataentry.test/api/entries?entity_id=voluptatem&limit=7&page=17&ascending=facere&ordering=%7B+field+%3A+3374f9a4-01db-42e1-ac52-790e44e4ea1c+%2C+order+%3A+asc%7D&customFilters=deleniti" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"entity_id":"atque","limit":5,"ascending":false,"page":7,"ordering":"voluptatem","customFilters":["a"]}'
const url = new URL(
"http://dataentry.test/api/entries"
);
let params = {
"entity_id": "voluptatem",
"limit": "7",
"page": "17",
"ascending": "facere",
"ordering": "{ field : 3374f9a4-01db-42e1-ac52-790e44e4ea1c , order : asc}",
"customFilters": "deleniti",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"entity_id": "atque",
"limit": 5,
"ascending": false,
"page": 7,
"ordering": "voluptatem",
"customFilters": [
"a"
]
}
fetch(url, {
method: "GET",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/entries
Query Parameters
entity_id
string
The collection from wich to retrieve entries
limit
string optional
Pagination setting, number of records to retrieve. Defaults to 30
page
string optional
Page number to retrieve in pagination.
ascending
string optional
Get entries in asc/decs order based on entry id.
ordering
string optional
Retrieve entries ordered by a field value.
customFilters
string optional
Custom filters for querying and sorting retrieved entries.
Body Parameters
entity_id
string
limit
integer optional
ascending
boolean optional
page
integer optional
ordering
string optional
customFilters
array optional
Create a new entry.
Example request:
curl -X POST \
"http://dataentry.test/api/entries" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"entity_id":12,"data":"{ 3374f9a4-01db-42e1-ac52-790e44e4ea1c : 100 , 3374f9a4-01db-42e1-ac52-790e44e4ea4f : 2020-04-02}"}'
const url = new URL(
"http://dataentry.test/api/entries"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"entity_id": 12,
"data": "{ 3374f9a4-01db-42e1-ac52-790e44e4ea1c : 100 , 3374f9a4-01db-42e1-ac52-790e44e4ea4f : 2020-04-02}"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/entries
Body Parameters
entity_id
integer
The collection to create the entry on.
data
array
The entry data, consisting of field:value array.
Update Entry
update a given entry.
Example request:
curl -X POST \
"http://dataentry.test/api/entries/{entryId}?entryId=sunt" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"data":"{ 3374f9a4-01db-42e1-ac52-790e44e4ea1c : 100 , 3374f9a4-01db-42e1-ac52-790e44e4ea4f : 2020-04-02}"}'
const url = new URL(
"http://dataentry.test/api/entries/{entryId}"
);
let params = {
"entryId": "sunt",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"data": "{ 3374f9a4-01db-42e1-ac52-790e44e4ea1c : 100 , 3374f9a4-01db-42e1-ac52-790e44e4ea4f : 2020-04-02}"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/entries/{entryId}
Query Parameters
entryId
string
The entry to update
Body Parameters
data
array
The entry data, consisting of field:value array.
Revert a Changelog difference on entry.
Example request:
curl -X POST \
"http://dataentry.test/api/entries/{entryOid}/revert/{diffOid}?entryOid=ut&diffOid=laboriosam" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"field":"atque"}'
const url = new URL(
"http://dataentry.test/api/entries/{entryOid}/revert/{diffOid}"
);
let params = {
"entryOid": "ut",
"diffOid": "laboriosam",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"field": "atque"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/entries/{entryOid}/revert/{diffOid}
Query Parameters
entryOid
string
The entry to revert.
diffOid
string
The changelog difference to revert.
Body Parameters
field
string
The field uuid to update
Field
Get all field types.
Example request:
curl -X GET \
-G "http://dataentry.test/api/field/types" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/field/types"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/field/types
Get all field meta types.
Example request:
curl -X GET \
-G "http://dataentry.test/api/field/meta-types" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/field/meta-types"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/field/meta-types
Get all guarded fields.
Example request:
curl -X GET \
-G "http://dataentry.test/api/field/guarded" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/field/guarded"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/field/guarded
api/field/guarded-for-entity/{entityId}
Example request:
curl -X GET \
-G "http://dataentry.test/api/field/guarded-for-entity/{entityId}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/field/guarded-for-entity/{entityId}"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/field/guarded-for-entity/{entityId}
api/field/get-field-options-for-dependency
Example request:
curl -X POST \
"http://dataentry.test/api/field/get-field-options-for-dependency" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/field/get-field-options-for-dependency"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/field/get-field-options-for-dependency
Get all field constraints.
Example request:
curl -X GET \
-G "http://dataentry.test/api/field/constraints" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/field/constraints"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/field/constraints
Get fields from collection
Get all the fields a given collection is made up of.
Example request:
curl -X GET \
-G "http://dataentry.test/api/collections/{id}/fields?id=possimus" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/collections/{id}/fields"
);
let params = {
"id": "possimus",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/collections/{id}/fields
Query Parameters
id
string
The collection to retrieve fields from
Organization
Get all organizations.
Example request:
curl -X GET \
-G "http://dataentry.test/api/organizations" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/organizations"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/organizations
Create organization.
Example request:
curl -X POST \
"http://dataentry.test/api/organizations" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"molestias","address":"placeat","profile_image":"assumenda","favicon":"consequatur"}'
const url = new URL(
"http://dataentry.test/api/organizations"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "molestias",
"address": "placeat",
"profile_image": "assumenda",
"favicon": "consequatur"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/organizations
Body Parameters
name
string
The organization name
address
string
The organization address
profile_image
image optional
The organization profile image
favicon
image optional
The organization profile image
Get all organizations for the authenticated user
Only returns organizations where the authenticated user is attached.
Example request:
curl -X GET \
-G "http://dataentry.test/api/organizations-for-user" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/organizations-for-user"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/organizations-for-user
Switch the given users current organization.
Example request:
curl -X POST \
"http://dataentry.test/api/switch-users-current-org" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"user_id":5,"organization_id":6}'
const url = new URL(
"http://dataentry.test/api/switch-users-current-org"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"user_id": 5,
"organization_id": 6
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/switch-users-current-org
Body Parameters
user_id
integer
The user for wich to switch organization
organization_id
integer
The organization to switch to
Attach user to organization.
Example request:
curl -X POST \
"http://dataentry.test/api/organizations/attach-user" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"user_id":12,"organization_id":16,"role_id":10}'
const url = new URL(
"http://dataentry.test/api/organizations/attach-user"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"user_id": 12,
"organization_id": 16,
"role_id": 10
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/organizations/attach-user
Body Parameters
user_id
integer
The user to attach
organization_id
integer
The organization to attach to
role_id
integer
The role the user should have for the given organization
Detach user from organization.
Example request:
curl -X POST \
"http://dataentry.test/api/organizations/detach-user" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"user_id":13,"organization_id":14}'
const url = new URL(
"http://dataentry.test/api/organizations/detach-user"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"user_id": 13,
"organization_id": 14
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/organizations/detach-user
Body Parameters
user_id
integer
The user to detach
organization_id
integer
The organization to detach from
Update user role for a given organization.
Example request:
curl -X POST \
"http://dataentry.test/api/organizations/update-user-role" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"user_id":2,"organization_id":2,"role_id":13}'
const url = new URL(
"http://dataentry.test/api/organizations/update-user-role"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"user_id": 2,
"organization_id": 2,
"role_id": 13
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/organizations/update-user-role
Body Parameters
user_id
integer
The user to update
organization_id
integer
The organization for the role update
role_id
integer
The role the user should be updated to have
Get organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/organizations/{orgId}?orgId=odit" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/organizations/{orgId}"
);
let params = {
"orgId": "odit",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/organizations/{orgId}
Query Parameters
orgId
string
The organization to retrieve
Update an organization.
Example request:
curl -X POST \
"http://dataentry.test/api/organizations/{orgId}?orgId=culpa" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"blanditiis","address":"quasi","profile_image":"ut","favicon":"id"}'
const url = new URL(
"http://dataentry.test/api/organizations/{orgId}"
);
let params = {
"orgId": "culpa",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "blanditiis",
"address": "quasi",
"profile_image": "ut",
"favicon": "id"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/organizations/{orgId}
Query Parameters
orgId
string
The organization to update
Body Parameters
name
string
The organization name
address
string
The organization address
profile_image
image optional
The organization profile image
favicon
image optional
The organization profile image
Get all possible roles for system.
Example request:
curl -X GET \
-G "http://dataentry.test/api/roles" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/roles"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/roles
Users
Get all users.
gets all the users from the current org
Example request:
curl -X GET \
-G "http://dataentry.test/api/users" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/users
Get all users independent of current organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/users/system-wide" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users/system-wide"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/users/system-wide
Get roles
provide an user id to get the users roles.
Example request:
curl -X GET \
-G "http://dataentry.test/api/users/roles/{id?}?id=laborum" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users/roles/{id?}"
);
let params = {
"id": "laborum",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/users/roles/{id?}
Query Parameters
id
string optional
Get roles from specific user
Get single user
retrieves the given user by user id.
Example request:
curl -X GET \
-G "http://dataentry.test/api/users/{id}?id=ut" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users/{id}"
);
let params = {
"id": "ut",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/users/{id}
Query Parameters
id
string
The user to retrieve
Get all users from a given organization.
Example request:
curl -X GET \
-G "http://dataentry.test/api/users-from-org/{orgId}?orgId=quis" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users-from-org/{orgId}"
);
let params = {
"orgId": "quis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/users-from-org/{orgId}
Query Parameters
orgId
string
The organization from wich users are retrieved
Get users by name
Will return all users where name matches search name.
Example request:
curl -X GET \
-G "http://dataentry.test/api/users/search/{name}?name=adipisci" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users/search/{name}"
);
let params = {
"name": "adipisci",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
GET
api/users/search/{name}
Query Parameters
name
string
the name to search for (does not need to be a full name)
Create user
create required a new user.
Example request:
curl -X POST \
"http://dataentry.test/api/users" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"sit","email":"repellendus","initials":"fugit","color":"laborum","password":"rerum","image":"quaerat"}'
const url = new URL(
"http://dataentry.test/api/users"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "sit",
"email": "repellendus",
"initials": "fugit",
"color": "laborum",
"password": "rerum",
"image": "quaerat"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/users
Body Parameters
name
string
the name of the user
email
string
the email of the user
initials
string
the initials of the user
color
string
the hex color value that should be assigned to the user
password
string
the password for the user
image
image optional
optional The profile image for the user
Update user
update a given user.
Example request:
curl -X POST \
"http://dataentry.test/api/users/{id}?id=perspiciatis" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"repellendus","email":"facilis","initials":"fugit","color":"perspiciatis","password":"assumenda","image":"odit"}'
const url = new URL(
"http://dataentry.test/api/users/{id}"
);
let params = {
"id": "perspiciatis",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
let body = {
"name": "repellendus",
"email": "facilis",
"initials": "fugit",
"color": "perspiciatis",
"password": "assumenda",
"image": "odit"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/users/{id}
Query Parameters
id
string optional
The user to update
Body Parameters
name
string
the name of the user
email
string
the email of the user
initials
string
the initials of the user
color
string
the hex color value that should be assigned to the user
password
string
the password for the user
image
image optional
optional The profile image for the user
api/users/{id}/removeFromOrg
Example request:
curl -X POST \
"http://dataentry.test/api/users/{id}/removeFromOrg" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
const url = new URL(
"http://dataentry.test/api/users/{id}/removeFromOrg"
);
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Request
POST
api/users/{id}/removeFromOrg