Top Menu

Jump to content
  • OpenProject
    • View all projects
Home
    • Work packages
    • News
    • Getting started
    • Introduction video
    • Welcome to OpenProject

      Get an overview

      Get a quick overview of project management and team collaboration with OpenProject.

    • Help and support
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Professional support

    • Additional resources
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Create a new account
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
  • Roadmap
  • Work packages
  • You are here:Forums
You are here:
  • Forums
  • Development

Content

GravatarCreate a project with API

Added by Adrien BALTARDIVE almost 2 years ago

Hi everyone,

This is my first post on your forum.
I have been testing OpenProject API v3. I can create a new workpackage, all good.

However, I wish to create a new project using API, I can’t see it in the documentation so far.

Is it possible? If not, an alternative would be to use command line via ssh ?

Thanks.
Adrien.


Replies (7)

Gravatar RE: Create a project with API - Added by Oliver Günther almost 2 years ago

Hi Adrien,

it is not yet possible to create projects through the API.

You should easily be able to create one through the commandline, though. Use the following command as a starter point (packaged installation)

openproject run bundle exec rails runner “Project.create(identifier: ‘my-new-myproject’, name: ‘My new project’);”

Best,
Oliver

Gravatar RE: Create a project with API - Added by Adrien BALTARDIVE almost 2 years ago

Thanks Oliver, I’ll try that.

Gravatar RE: Create a project with API - Added by Niels Lindenthal almost 2 years ago

There is also a feature request for this in the wish list:

Epic #18809 new: CRUD operations for projects in API v3

Gravatar RE: RE: Create a project with API - Added by sifudam . 8 months ago

if any progress was made regarding the creation of project through api ? or is there any other way to “trigger” project creation except by web browser ?

Gravatar RE: Create a project with API - Added by Harald Holzmann 5 months ago

Is it also possible to assign a user to a project via command line?

Gravatar RE: Create a project with API - Added by Harald Holzmann 5 months ago

I found out, it's working with:

openproject run bundle exec rails runner "Member.create(project_id: 111, role_ids: [9], user_id: 46);"

Gravatar RE: Create a project with API - Added by Ehsan Aleem Avee 2 months ago

Hi Everyone,

I would really appreciate, if you could also let me know whether I can generate api access token for users except by web browser? Is there any way to do that via api call or bash script? Basically I would like to create an user by api call using admin user and then generate the access token for newly created user.

  • (1 - 7/7)
Loading...