Authentication
All API requests require a valid Edworking access token, sent as Authorization: Bearer <token>.
Recommended. Using a manually generated API token has some drawbacks, so it may not be the most suitable authentication method. Instead, generate the token dynamically during login, so it is created automatically from the user's email and password rather than being manually created and stored.
Generate a token during login
Copy fetch('https://gateway.edworking.com/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
operationName: 'Login',
query: `
mutation Login($email: String!, $password: String!, $project: ID) {
login(email: $email, password: $password, project: $project) {
token
user { id }
}
}
`,
variables: { email, password },
}),
})
.then((response) => response.json())
.then(({ data }) => {
const edworkingToken = data.login.token
// Use edworkingToken in the Authorization header:
// Authorization: Bearer <token>
})
Personal token (alternative)
Any Edworking user can generate a personal token:
Click your avatar in the top-right corner and select Preferences .
Open the Admin tab.
Under API Token , click Copy Token .
Query example
Once you have a token, include it in the Authorization header and send your query:
Copy fetch('https://gateway.edworking.com/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${edworkingToken}`,
},
body: JSON.stringify({
query: 'query GetProjects { getProjects { id name } }',
}),
})
.then((response) => response.json())
.then(({ data }) => {
const projects = data.getProjects
})
Queries
Copy getFiles(project: ID, task: ID, privat: ID, inquiry: ID, category: String, portfolio: ID, folder: ID): [File]
Arguments
Argument Type
project
ID
Optional
task
ID
Optional
privat
ID
Optional
inquiry
ID
Optional
category
String
Optional
portfolio
ID
Optional
folder
ID
Optional
Returns
[File ]
Copy getFolders(project: ID!, folder: ID): [Folder]
Arguments
Argument Type
project
ID!
Required
folder
ID
Optional
Returns
[Folder ]
Copy getMessages(project: ID, invitation: ID, task: ID, meetingroom: ID, privat: ID, inquiry: ID, first: Int): [Message]
Arguments
Argument Type
project
ID
Optional
invitation
ID
Optional
task
ID
Optional
meetingroom
ID
Optional
privat
ID
Optional
inquiry
ID
Optional
first
Int
Optional
Returns
[Message ]
getMessagesStates
Query
#
Copy getMessagesStates(project: ID): [Message]
Arguments
Argument Type
project
ID
Optional
Returns
[Message ]
Copy getNotifications(project: ID, first: Int, after: Int): [Notification]
Arguments
Argument Type
project
ID
Optional
first
Int
Optional
after
Int
Optional
Returns
[Notification ]
Copy getProjects: [Project!]
Arguments
No arguments.
Returns
[Project !]
Copy getStatesProject(project: ID): [StateProject]
Arguments
Argument Type
project
ID
Optional
Returns
[StateProject ]
Copy getTask(id: ID!): Task!
Arguments
Argument Type
id
ID!
Required
Returns
Task !
Copy getTasks(project: ID, first: Int): [Task!]
Arguments
Argument Type
project
ID
Optional
first
Int
Optional
Returns
[Task !]
Copy getUsers(project: ID, task: ID, inactive: Boolean): [User!]
Arguments
Argument Type
project
ID
Optional
task
ID
Optional
inactive
Boolean
Optional
Returns
[User !]
Mutations
Copy addTimeEntry(task: ID!, duration: Int!, startTime: DateTime!, description: String): TrackingTime!
Arguments
Argument Type
task
ID!
Required
duration
Int!
Required
startTime
DateTime !
Required
description
String
Optional
Returns
TrackingTime !
Copy createState(value: String, position: Int, project: ID): StateProject
Arguments
Argument Type
value
String
Optional
position
Int
Optional
project
ID
Optional
Returns
StateProject
Copy deleteState(state: ID!): StateProject
Arguments
Argument Type
state
ID!
Required
Returns
StateProject
Copy delFile(file: ID!): File!
Arguments
Argument Type
file
ID!
Required
Returns
File !
Copy delFolder(folder: ID!): Folder!
Arguments
Argument Type
folder
ID!
Required
Returns
Folder !
Copy delProject(project: ID!): Project!
Arguments
Argument Type
project
ID!
Required
Returns
Project !
Copy delTask(task: ID!, delSubtasks: Boolean): Task!
Arguments
Argument Type
task
ID!
Required
delSubtasks
Boolean
Optional
Returns
Task !
Copy duplicateTask(task: ID!): Task!
Arguments
Argument Type
task
ID!
Required
Returns
Task !
Copy ediFile(file: ID!, shared: Boolean): File!
Arguments
Argument Type
file
ID!
Required
shared
Boolean
Optional
Returns
File !
Copy ediFolder(name: String!, folder: ID): Folder!
Arguments
Argument Type
name
String!
Required
folder
ID
Optional
Returns
Folder !
ediProjectBasic
Mutation
#
Copy ediProjectBasic(id: ID!, name: String, logo: String, employees: [Employee], color: String): Project!
Arguments
Argument Type
id
ID!
Required
name
String
Optional
logo
String
Optional
employees
[Employee ]
Optional
color
String
Optional
Returns
Project !
Copy ediTask(id: ID!, state: ID, name: String, users: [ID!], description: String, project: ID!, color: String, logo: String, cover: String, length: LengthInput, files: [FileInput], deadline: DateTime): Task!
Arguments
Argument Type
id
ID!
Required
state
ID
Optional
name
String
Optional
users
[ID!]
Optional
description
String
Optional
project
ID!
Required
color
String
Optional
logo
String
Optional
cover
String
Optional
length
LengthInput
Optional
files
[FileInput ]
Optional
deadline
DateTime
Optional
Returns
Task !
Copy ediUserBasic(id: ID!, firstname: String!, lastname: String!, email: String!, password: String!, profileImg: String): AuthPayload!
Arguments
Argument Type
id
ID!
Required
firstname
String!
Required
lastname
String!
Required
email
String!
Required
password
String!
Required
profileImg
String
Optional
Returns
AuthPayload !
Copy login(email: String!, password: String!, project: ID): AuthPayload
Arguments
Argument Type
email
String!
Required
password
String!
Required
project
ID
Optional
Returns
AuthPayload
Copy loginApple(token: String!, project: ID, updateId: ID, invited: ID, promotion: Int, code: String): AuthPayload!
Arguments
Argument Type
token
String!
Required
project
ID
Optional
updateId
ID
Optional
invited
ID
Optional
promotion
Int
Optional
code
String
Optional
Returns
AuthPayload !
Copy loginGoogle(token: String!, project: ID, updateId: ID, invited: ID, promotion: Int, code: String): AuthPayload!
Arguments
Argument Type
token
String!
Required
project
ID
Optional
updateId
ID
Optional
invited
ID
Optional
promotion
Int
Optional
code
String
Optional
Returns
AuthPayload !
removeTimeEntry
Mutation
#
Copy removeTimeEntry(id: ID!): TrackingTime!
Arguments
Argument Type
id
ID!
Required
Returns
TrackingTime !
Copy setFile(folder: ID, duration: Int, base64: String, gif: String, name: String!, code: String!, type: String!, size: Float!, freelancer: ID, project: ID, task: ID, privat: ID, inquiry: ID, location: String!, category: String): File!
Arguments
Argument Type
folder
ID
Optional
duration
Int
Optional
base64
String
Optional
gif
String
Optional
name
String!
Required
code
String!
Required
type
String!
Required
size
Float!
Required
freelancer
ID
Optional
project
ID
Optional
task
ID
Optional
privat
ID
Optional
inquiry
ID
Optional
location
String!
Required
category
String
Optional
Returns
File !
Copy setFolder(name: String!, project: ID!, level: Int, task: ID, folder: ID): Folder!
Arguments
Argument Type
name
String!
Required
project
ID!
Required
level
Int
Optional
task
ID
Optional
folder
ID
Optional
Returns
Folder !
Copy setMessage(id: ID, body: String, project: ID, meetingroom: ID, privat: ID, task: ID, inquiry: ID, file: ID, type: String, entities: [EntityInput]): Message!
Arguments
Argument Type
id
ID
Optional
body
String
Optional
project
ID
Optional
meetingroom
ID
Optional
privat
ID
Optional
task
ID
Optional
inquiry
ID
Optional
file
ID
Optional
type
String
Optional
entities
[EntityInput ]
Optional
Returns
Message !
Copy setProject(name: String!, users: [ID!], newusers: [Employee], description: String, logo: String, color: String): Project!
Arguments
Argument Type
name
String!
Required
users
[ID!]
Optional
newusers
[Employee ]
Optional
description
String
Optional
logo
String
Optional
color
String
Optional
Returns
Project !
Copy setTask(state: ID, name: String, users: [ID!], description: String, project: ID!, logo: String, color: String, cover: String, length: LengthInput, files: [FileInput], edworkers: [ID], deadline: DateTime): Task!
Arguments
Argument Type
state
ID
Optional
name
String
Optional
users
[ID!]
Optional
description
String
Optional
project
ID!
Required
logo
String
Optional
color
String
Optional
cover
String
Optional
length
LengthInput
Optional
files
[FileInput ]
Optional
edworkers
[ID]
Optional
deadline
DateTime
Optional
Returns
Task !
Copy updateState(state: ID!, position: Int, icon: Int, value: String): StateProject
Arguments
Argument Type
state
ID!
Required
position
Int
Optional
icon
Int
Optional
value
String
Optional
Returns
StateProject
Copy updateStates(ids: [ID], positions: [Int]): Boolean
Arguments
Argument Type
ids
[ID]
Optional
positions
[Int]
Optional
Returns
Boolean
No results found.