Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
osticket
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
docker
osticket
Commits
8033545a
You need to sign in or sign up before continuing.
Commit
8033545a
authored
12 years ago
by
Peter Rotich
Browse files
Options
Downloads
Patches
Plain Diff
Add sample payload for remote email piping
Add tasks
parent
731baca1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
setup/doc/api.md
+1
-0
1 addition, 0 deletions
setup/doc/api.md
setup/doc/api/tasks.md
+9
-0
9 additions, 0 deletions
setup/doc/api/tasks.md
setup/doc/api/tickets.md
+55
-2
55 additions, 2 deletions
setup/doc/api/tickets.md
with
65 additions
and
2 deletions
setup/doc/api.md
+
1
−
0
View file @
8033545a
...
@@ -27,3 +27,4 @@ Resources
...
@@ -27,3 +27,4 @@ Resources
---------
---------
-
[
Tickets
](
api/tickets.md
)
-
[
Tickets
](
api/tickets.md
)
-
[
Tasks
](
api/tasks.md
)
This diff is collapsed.
Click to expand it.
setup/doc/api/tasks.md
0 → 100644
+
9
−
0
View file @
8033545a
Tasks
=======
The API supports tasks execution via the HTTP API. Cron is the only supported task as the moment.
Execute Cron Job
---------------
Cron job can be executed, remotely, by making a post to
`POST /api/tasks/cron`
. See
`scripts/rcron.php`
This diff is collapsed.
Click to expand it.
setup/doc/api/tickets.md
+
55
−
2
View file @
8033545a
...
@@ -9,7 +9,7 @@ Create a Ticket
...
@@ -9,7 +9,7 @@ Create a Ticket
---------------
---------------
Tickets can be created in the osTicket system by sending an HTTP POST to
Tickets can be created in the osTicket system by sending an HTTP POST to
`api/tickets.xml`
or
`api/tickets.json`
depending on the format of the
`api/tickets.xml`
,
`api/tickets.email`
or
`api/tickets.json`
depending on the format of the
request content.
request content.
### Fields ######
### Fields ######
...
@@ -32,7 +32,7 @@ request content.
...
@@ -32,7 +32,7 @@ request content.
*
__name__:
*required*
name of the file to be attached. Multiple files
*
__name__:
*required*
name of the file to be attached. Multiple files
with the same name are allowable
with the same name are allowable
*
__type__: Mime type of the file. Default is
`text/plain`
*
__type__: Mime type of the file. Default is
`text/plain`
*
__encoding__: Set to
`base64`
if content is base64 encoded
*
__encoding__: Set to
`base64`
if content is base64 encoded
### XML Payload Example ######
### XML Payload Example ######
...
@@ -109,6 +109,59 @@ an object or array definition, and newlines are not allowed inside strings.
...
@@ -109,6 +109,59 @@ an object or array definition, and newlines are not allowed inside strings.
[
rfc 2397
]:
http://www.ietf.org/rfc/rfc2397.txt
"Data URLs"
[
rfc 2397
]:
http://www.ietf.org/rfc/rfc2397.txt
"Data URLs"
### Email Payload Example ######
*
`POST /api/tickets.email`
osTicket supports both remote (over http) and local piping. Please refer to the wiki on step-by-step instruction of setting up email piping.
```
email
MIME-Version
:
1.0
Received
:
by 10.194.9.167 with HTTP; Thu, 7 Feb 2013 09:01:04 -0800 (PST)
Date
:
Thu, 7 Feb 2013 11:01:04 -0600
Delivered-To
:
support@osticket.com
Message-ID
:
<CAL4KyrgKmpYxdX+6u3HyHZ3qN5K0mU2_sdfoVu6rT8cUNn+52w@osticket.com>
Subject
:
Testing
From
:
Peter Rotich <peter@osticket.com>
To
:
support@osticket.com
Content-Type
:
multipart/mixed; boundary=047d7bfcfaf263782204d52563a5
--047d7bfcfaf263782204d52563a5
Content-Type: multipart/alternative; boundary=047d7bfcfaf263781204d52563a3
--047d7bfcfaf263781204d52563a3
Content-Type: text/plain; charset=ISO-8859-1
Testing testing.
--
Peter Rotich
http://www.osticket.com
--047d7bfcfaf263781204d52563a3
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Testing testing.<br clear=3D"all"><div><br></div>-- <br>Pe=
ter Rotich<br>
<a href=3D"http://www.osticket.com" target=3D"_blank">http://www.osticket.=
com</a>
</div>
--047d7bfcfaf263781204d52563a3--
--047d7bfcfaf263782204d52563a5
Content-Type: text/plain; charset=US-ASCII; name="file.txt"
Content-Disposition: attachment; filename="file.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hcw5kqf60
Sm9lIGRhZGR5cyBjb250ZW50Cg==
--047d7bfcfaf263782204d52563a5--
```
Local piping can utilize
`api/pipe.php`
without the neeed to setup an API key.
### Response ######
### Response ######
If successful, the server will send
`HTTP/201 Created`
. Otherwise, it will
If successful, the server will send
`HTTP/201 Created`
. Otherwise, it will
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment